The time taken by a body to fall freely under gravity from a height \( h \) is given by:
\[
t = \sqrt{\frac{2h}{g}}
\]
Where \( g \) is the acceleration due to gravity.
For two bodies dropped from heights \( h_1 \) and \( h_2 \), the times taken for the bodies to reach the ground are:
\[
t_1 = \sqrt{\frac{2h_1}{g}}, \quad t_2 = \sqrt{\frac{2h_2}{g}}
\]
The ratio of the times is:
\[
\frac{t_1}{t_2} = \frac{\sqrt{\frac{2h_1}{g}}}{\sqrt{\frac{2h_2}{g}}} = \sqrt{\frac{h_1}{h_2}}
\]
Thus, the ratio of the times is \( \sqrt{\frac{h_1}{h_2}} \).
\[
\boxed{\sqrt{\frac{h_1}{h_2}}}
\]