(c) Initial momentum of the system $= m_{1} \times 40 + m_{2} \times 0$
Final momentum of the system $= (m_{1} + m_{2}) \times 30$
By the law of conservation of momentum
$m_{1} \times 40 + m_{2} \times 0 = (m_{1} + m_{2}) \times 30$
$\Rightarrow 40m_{1} = 30m_{1} + 30m_{2} \Rightarrow 10m_{1} = 30m_{2} = \frac{m_{1}}{m_{2}} = 3$