Heat up the solder joint at one end of the reed switch to soften the solder then lever the leadwire out of the solder using a small screwdriver. Do the same for the other end to remove the old reed switch. Ideally you should then remove all the old solder using de-solder braid or a solder sucker and then solder in the new switch with fresh solder. However you will probably get away with holding the switch in position and reheating the existing solder to remake the joints. You could use sticky tape to temporarily hold the switch in position while applying the soldering iron. You can use a small screwdriver to push the leadwire into the solder as the solder softens.