Answer:
a) 0.25m
b) 5 m/s
Explanation:
When the spring is compressed both boxes are moving with the same velocity, so applying the principle of linear momentum conservation:
[tex]m1*v_{o1}+m2*v_{o2}=(m1+m2)*v\\v=5m/s[/tex]
Now applying the principle of energy conservation:
[tex]K1+K2+U_{g1}-U_e=Kf+U_{g2}\\K1+0-U_e=K2+0\\U_e=K1+K2-kf\\\frac{1}{2}*k*x^2+=\frac{1}{2}*m1*v1^2+\frac{1}{2}*m1*v1^2-\frac{1}{2}*(m1+m2)*v^2\\\\x=\sqrt{\frac{2.00kg*(10m/s)^2+5.00kg*(3.00m/s)^2-7.00kg*(5m/s)^2}{1120N/m}}\\x=0.25m[/tex]
We got that the maximum compression is 0.25m.