If the ratio of AM and HM of two positive real numbers (a and b) is m:n. Find a:b. $$AM = \frac{a+b}2\text{ and }HM = \frac{2ab}{a+b}$$
Therefore $AM/HM= (a+b)^2/4ab=m/n$.
I'm not able to proceed further. What do I need to do to get $a/b$? Thanks in advance. :)
Also, the answer is $\dfrac { \sqrt{m} + \sqrt{m-n}}{ \sqrt{m} - \sqrt{m-n}}$ how do I get it?

$$AM = \frac{a + b}{2}$$
$$HM = \frac{2ab}{a + b}$$
$$\frac{AM}{HM} = \frac{(a + b)^2}{4ab} = \frac{m}{n}$$
Let $m = (a + b)^2$ and let $n = 4ab$.  Then $m - n = (a - b)^2$.
Therefore,
$$a + b = \sqrt{m}$$
$$a - b = \sqrt{m - n}.$$
Consequently,
$$a = \frac{\sqrt{m} + \sqrt{m - n}}{2}$$
$$b = \frac{\sqrt{m} - \sqrt{m - n}}{2}.$$
Finally,
$$\frac{a}{b} = \frac{\sqrt{m} + \sqrt{m - n}}{\sqrt{m} - \sqrt{m - n}},$$
as desired.
QED.
