Block of mass m2 shoots off carrying some kinetic energy away from the system. To find its speed, potential energy of spring = maximum kinetic energy of blocks.
kd2
2
=(m1+m2)
v2
2
[k = force constant of spring] v2=
kd2
m1+m2
with m1 along on the spring. Maximum potential energy = Maximum kinetic energy of m2 ⇒