Step 1: Slice off the old sheath
Unplug the charger!
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.