Let the two numbers be $a$ and $b.$
$A.M. = \frac{a+b}{2}$ and $G.M. = \sqrt{ab}.$
According to the given condition,
$\frac{a+b}{2\sqrt{ab}} = \frac{m}{n}$
$\Rightarrow \frac{(a+b)^{2}}{4ab} = \frac{m^{2}}{n^{2}}$
$\Rightarrow (a+b)^{2} = \frac{4abm^{2}}{n^{2}}$
$\Rightarrow a+b = \frac{2\sqrt{ab}m}{n} \quad \dots(1)$
Using the identity $(a-b)^{2} = (a+b)^{2} - 4ab,$
$(a-b)^{2} = \frac{4abm^{2}}{n^{2}} - 4ab = \frac{4ab(m^{2}-n^{2})}{n^{2}}$
$\Rightarrow a-b = \frac{2\sqrt{ab}\sqrt{m^{2}-n^{2}}}{n} \quad \dots(2)$
Adding $(1)$ and $(2),$ we obtain $2a = \frac{2\sqrt{ab}}{n}(m + \sqrt{m^{2}-n^{2}}),$
$\Rightarrow a = \frac{\sqrt{ab}}{n}(m + \sqrt{m^{2}-n^{2}}).$
Substituting $a$ in $(1),$ we get $b = \frac{\sqrt{ab}}{n}(m - \sqrt{m^{2}-n^{2}}).$
Therefore,$\frac{a}{b} = \frac{m + \sqrt{m^{2}-n^{2}}}{m - \sqrt{m^{2}-n^{2}}}.$
Thus,$a:b = (m + \sqrt{m^{2}-n^{2}}) : (m - \sqrt{m^{2}-n^{2}}).$