It is possible that you have enough parts between the two guns to come up with one in good working order. As has already been suggested, first check the bores on both guns. Use the one with the best bore as your build gun. If neither bore is satisfactory, you may have a problem. Many gunsmiths do not recommend relining the bore on the model 12 due to the way the chamber end of the barrel is constructed. I believe you mentioned both guns would fire? If you have actually test fired both guns, give the bores a good cleaning and test fire for accuracy.
A word of caution here, if the action does not stay locked up when you raise the barrel, make sure the pump action is held securely all the way forwards. Also, use standard velocity ammo - no high velocity.
As far as the failure to lock up is concerned, you will note the presence of a slotted recess in the bottom of the receiver just in front of the trigger. The part you see there and that normally is pressed upwards to release the pump action is the cartridge lifter (called a carrier). If you break the gun down by loosening the takedown screw and remove the stock/trigger assembly from the receiver, you can see that the outer magazine is attached to what is called an action bar that extends into the receiver. In the end of that bar on one side is a long narrow spring loaded part called the carrier dog. When you slide the action to the rear, the carrier dog engages a slot in the carrier and causes it to lift the cartridge into position for chambering. When you slide the action all the way forwards, the dog locks in behind the carrier to secure the action and bolt assembly for firing.
If your slide action drops without pressing the carrier upwards, then most likely there is wear on the face of the carrier dog and/or carrier where the dog locks behind the carrier. One or both of those will have to be replaced.
From looking at the end of the outer magazine tube in the one gun, it may be too damaged to use.