changing from 3 prong to 4 prong cord

I purchased a 4 prong cord and attemped to hook it up to our dryer, which had a 3 prong cord previously. The 4 prong cord has four wires; black, red, white and green. THere is also a very long green wire that looks as though has been added by previous owner…maybe for the ground screw? What do I do with the long green wire and the green wire attached at the end of the cord?

ALso, how do I know what side the black and red wires go? I was told that you need to match them up (red to red, black to black, white to white); however, currently one side has a black and yellow (together) and the other side is a blue wire. I am confused!!! Please help. THank you.

Here is a service manual which includes your unit.
http://appliancedigest.com/index.php?/files/file/472-16008714-1994-1997-maytag-dryers-service-manual/
You have to join the site to download the manual but it is free and this is a very good site for manuals and other info for the appliance repair DIYer.

Looking at your unit’s wiring diagram (Page 5-70).
Black and yellow is L1 which should be line cord black
Blue is L2 which should be line cord red.
White is Neutral which should be line cord white. This is normally the center connector on the terminal strip.

Also see page 1-13.

On a 3 wire Neutral and machine frame (ground) are the same so a jumper is used to connect the Neutral at the terminal strip to the machine frame.

On a 4 wire Neutral and machine frame/ground are separate as the line cord has a Neutral (white) and an earth ground (green) wires.
So the jumper is removed and then the line cord Neutral (white) goes to white on the terminal strip. The line cord earth ground (green) is then connected to the machine frame where the jumper used to be connected.