Answer:
xmax = 0.65m
Explanation:
When the spring is maximum compressed all kinetic energy of both masses will be elastic potential energy of the spring. From there we can take apart xmax. Hence we have
[tex]E_{k1}+E_{k2}=\frac{1}{2}kx_{max}^2[/tex]
[tex]x_{max}=\sqrt{\frac{1}{k}(m_1v_1^2+m_2v_2^2)}\\x_{max}=\sqrt{\frac{1}{571N/m}[(2.0kg)(10\frac{m}{s})^2+(5.0kg)(3.0\frac{m}{s})^2]}\\\\x_{max}=0.65m[/tex]
hope this helps!!