The model 5,2 has a Mini-DVI port not a Mini DisplayPort. Depends on what input plug you'll be using on your TV. VGA, DVI, Composite or HDMI. You'll need a Mini-DVI adapter and a cable from that to your TV. Here's the various types of Mini-DVI adapters on Amazon.com http://www.amazon.com/s/ref=nb_sb_noss?url=search-alias%3Daps&field-keywords=min i-dvi&x=9&y=13
(Composite is the red, white and yellow RCA plugs on your TV or red, white and S-Video plugs.)
You'll also need audio cables to the TV using a 3.5mm stereo headphone jack to RCA sound plugs or a 3.5mm stereo input plug for audio. You attach it from the headphone jack of your MacBook to the appropriate audio input plugs on your TV.
If you connect the MacBook using a Mini-DVI to HDMI adapter you will probably need to use external speakers or a 3.5mm stereo headphone jack to RCA sound plugs connected to a stereo system for audio if your TV doesn't have separate RCA input plugs or a 3.5mm stereo input plug for audio with the HDMI plug. The Mini-DVI to HDMI doesn't carry audio and there're no audio plugs on most TVs to work with HDMI since it's expecting audio with the HDMI. Check your TV manual though to see if it might have audio plugs that work with one of the HDMI ports.
When you first hook it up it will probably have the display set in Extended Desktop mode. The Menu Bar and Dock will be on the MacBook display and your background screen on the TV but you can move the cursor onto the TV screen.
In System Preferences>Display on the MacBook screen there should be an Arrangement tab when you have the MacBook hooked up to the TV and both screens working. When you click the Arrangement tab do you see two monitors side by side? One of them will have a Menu Bar at the top. Just click on the Menu Bar and drag it to the second monitor. That will make the second monitor your main screen.
The TV will now have the Dock and Menu Bar and windows will open on it. But you can move the cursor to the MacBook screen and move windows from the TV over to the MacBook screen.
You can now use your MacBook in Clamshell Mode with a wired or Bluetooth keyboard and mouse. http://support.apple.com/kb/HT3131 When you disconnect from the TV your Menu Bar will automatically change back to the MacBook.
Or if you want to use the MacBook’s keyboard and trackpad to work on the MacBook screen while showing it on a TV you can check the Mirror Display box on the lower left hand side of the Arrangement tab under the two monitors box. That will give you the same screen at the same resolution on both the MacBook and the external monitor.