$\mathrm{T}_{1}=2 \pi \sqrt{\frac{l}{\mathrm{g}}}$ but for case of $\mathrm{SHM}$ in the plane
of rails $\mathrm{T}_{2}=2 \pi \sqrt{\frac{\mathrm{m}_{1} l}{\left(\mathrm{m}_{1}+\mathrm{m}_{2}\right) \mathrm{g}}}$ so $\frac{\mathrm{T}_{2}}{\mathrm{T}_{1}}=\sqrt{\frac{\mathrm{m}_{1}}{\mathrm{m}_{1}+\mathrm{m}_{2}}}$

