In the given problem, I can understand that after placing the two blocks in equilibrium it oscillates with an amplitude,
$$A=\frac{2}{k}(m_1+m_2)g\sin\phi$$
The answer for (b) is given as
$$\frac{1}{k}(m_1+m_2)g\sin\phi$$
To my knowledge, $m_2$ will separate from $m_1$ when the acceleration is greater than $g\sin\phi$ and so they should be separating only at max displacement on the right side as the $m_1$ retraces its path after imparting the greatest acceleration to $m_2$. So shouldn't the answer be $\frac{2}{k}(m_1+m_2)g\sin\phi$ on the right? Where am I going wrong?