There should be 3 insulated lugs in the dryer, two hots and a neutral. Connect the red and black wires in your new cord to the hot lugs (red & black are interchangeable), and the white neutral to the neutral lug. Neutral is the center wire on your older 3-wire cord, and should be a silver screw. Connect the green ground wire directly to the chassis of the dryer using a convenient screw. Use the four prong cord if you can. It is safer because it has the extra ground wire which older cords did not.
In your case its the yellow but the green ground attach's to the chassis of the dryer.