Step 1: Slice off the old sheath
Slice away the old rubber sheath. Underneath there is the metal plug, and it should have 2 wires soldered to it. One is the center of the wire from the charger, and the other is a short one that connects to the metal strands from the outer part of the charger. Try to remember which wire is connect to which part.
Once the rubber plug is removed cut the plug off the cord, cutting off the damaged part of the cord.
Next cut the sheath from around the magnet, and the magnet should slide off the cord.
You should be left with just a plain cord coming out of the transformer box.
Hold the frayed ends of the solder with the pliers and heat the solder attaching them to the plug to pull them off. A vise or an extra pair of hands helps with all the soldering.
I have no pictures for this step.
Step 2: Slide things on for future use
Step 3: Figure out which wire goes where
You can use a multimeter to insure you have the wires correct.
Step 4: Solder the connections
Slide the new tubing onto the wire, and solder them in. On my plug the middle wire went to the middle connector, and the outer wire went to the outside of the plug.
The third picture below shows the tubes in place so the two wires can short out.