It's a very simple guide to recycle components to build a raspberry pi b+ AV out component.
First of all you need to cut the wire, and separate the cables from each other.
Once you have separated the cables scrape each one with a sharped object in order to remove the thin layers that cover the cables.
Now with the cooper wire visible, you need to put some soldering iron on the tips. That makes the earphone cable stronger on the tips and also you could solder it easily.
At this step you must test the continuity of the cables, and try to find which one belongs to the VIDEO (4) and GROUND (3), as it's explained in this diagram:
To test continuity your multimeter must be selecting the diode:
When your multimeter shows:
That mean there's continuity, and that cable is connected to that segment of the 3.5 mm jack.