How do you rearrange
$$\frac{m_{1}}{\gamma_{2}} = \frac{\sqrt{\frac{m_1}{\gamma_2}}-m_1}{\gamma_1}$$
to get
$$\frac{\gamma_1}{\gamma_2} = \sqrt\frac{1}{m_1\gamma_2} - 1 $$ ?
I understand this may be remedial but if someone here could show me the steps then that would be very helpful.