Answer:
The spring was compressed the following amount:
Step-by-step explanation:
Use conservation of energy between initial and final state, considering that the surface id frictionless, and there is no loss in thermal energy due to friction. the total initial energy is the potential energy of the compressed spring (by an amount
), and the total final energy is the addition of the kinetic energies of both masses: