Ok. so we want to correctly add a plug. I have a couple of pumps that have 25' long cords on them. I don't need or want that much so I am going to cut the cord and them fix it so it works. I picked up a couple of different plugs at Lowe's for between $3 and $4.00. Cut the cord, striped off the outside insulation. If you look close at those two plugs yo will see two different colors of screws. One is gold (Black wire-Hot) one is silver(White wire-return). The one you may not be able to see is green(Green Wire-ground).
These plugs are back wire plugs. The wire gets stripped back and then shoved down the hole. Make sure you have loosened the screw so the little plate that holds it in place when you tighten the screw is open when you put the wire down the hole and then tighten the screw. I always strip back more then I need, it makes the wires easier to work with until you
know just how much you need. You can see how long they were and the length I want. Install them as simple as abc Black to gold, white to silver and green to green. Give a little tug on each wire to make sure they are tight. Tighten all screws. Test it. Done.
The other end would be done the same way except you would use wire nuts to connect black to black, white to white and green to green. If you happen to have a cord with two black wires then the one on the right side as you view it plugged into a socket is consider the black wire. When using wire nuts do not twist the wire together, hold them together and shove them into the wire nut as far as they will go and the hold the wires while you 'screw' the wire nut in place. When you have it tight and the wires begin to twist, stop you are tight. Now give that little tug on the wires to make sure they are tight. Its a good idea to use electrical tape to secure the connection. When you pull on the tape it stretches and pulls up tight. Hope this helps. VV