$\because$ Momentum before particle is attached to the ring, $=I \omega=m R^{2} \omega$
Momentum after two particle is attached to the ring,
$=I \omega / 2+\left(\mu x^{2}\right) \omega / 2$
Here, $\mu=\frac{M \cdot M}{M+M}=\frac{M}{2}$ and $x=2 R$
So, $I \frac{\omega}{2}+\left(\mu x^{2}\right) \frac{\omega}{2} =\left[m R^{2}+\frac{M}{2}\left(4 R^{2}\right)\right] \frac{\omega}{2}$
$=\left[m R^{2}+2 M R^{2}\right] \frac{\omega}{2}$
According law of conservation of momentum, (momentum before) $=$ (momentum after) $\Rightarrow m R^{2} \omega=\left(m R^{2}+2 M R^{2}\right) \frac{\omega}{2}$
$\Rightarrow 2 m R^{2}=m R^{2}+2 M R^{2}$
So $\frac{m}{M}=2$