Are you sure the second connector with the square holes only has two rows? It's probably a DVI connector, but that has three rows.
Assuming it is DVI, there are three flavors: digital, analog, and both digital and analog together. In the Mac world, it's both digital and analog. In the PC world it's usually digital only, I think.
If it is DVI with analog, then you could use a DVI to VGA adapter, which just adapts the plug to a VGA plug (the signal is unchanged). If it's digital only, then you have a problem because converting from digital DVI to analog VGA is no easy task. But, in that scenario, you might be able to use the digital DVI for the monitor, and the analog VGA for the TV. (I assume you don't want to dedicate your PC to this task by exclusively connecting it to the TV via VGA.) Check your monitor to see if it has a DVI input.