Place one side of the hinge in a table vice.
Drive out the pin by tapping a nail with a hammer into one end of the pin. The pin will push out of the hinge on the opposite side. Retain the pin.
Place the now loose half of the hinge in another table vice.
Cut the middle pin holding sections of the hinge halves with a small metal cutting saw. Keep the cuts straight and aligned with the edge of the hinge.
Release the second half of the hinge from the table vice.
Place the spring in the cut-out area of the hinge half still in a vice with one arm of the spring in front of the hinge, visible to you.
Set the second half of the hinge on the first half so the holes align and both arms of the spring are in front of the hinge.
Slide the pin into the hinge and through the spring. Use the hammer to tap the pin in place.