I have tried this problem four times and got a different answer every time, none of which are the answer provided in the book. I would very much appreciate if someone could show me how to do this step by step.

So can you see how the answers given can be put in the same form as the answer you require - even though they all look different?
–
Mark BennetMar 29 '12 at 11:00

I'm afraid I can't. I must be missing some fundamental concept.
–
bot_botMar 29 '12 at 11:59

Well you need to get everything under the same square root sign - which means squaring everything outside the square root as you move it inside, and then you need to clear fractions in the numerator and denominator of the main fraction: multiply top and bottom by $q^2$ or $A_1^2$.
–
Mark BennetMar 29 '12 at 12:17

Maybe not the fastest way, but step by step how I did it. Of course this answer can be brought into several equivalent forms.

multiplying the fraction inside the square root with $\frac{1/q^2}{1/q^2}$ gives
$$ \sqrt{\frac{1}{\frac{2gh}{q^2}+\frac{1}{A_1^2}}}= \pm A_2 $$
now with $\frac{A_1^2}{A_1^2}$ to get
$$ \sqrt{\frac{A_1^2}{\frac{2ghA_1^2}{q^2}+1}}= \pm A_2 $$
same expansion with $A_1^2$ starting from my first result gives
$$ \frac{A_1q}{\sqrt{2ghA_1^2+q^2}}= \sqrt{\frac{A_1^2q^2}{2ghA_1^2+q^2}}= \pm A_2 $$
You can keep going as long as you want.... (incidently your closest solution that you have posted does not work due to a wrong invertion as already mentioned in the comments)

@mal: no problem. I've modified my solution to show the equivalence of some solutions. Yours is not among them because your "invert again" step was wrong (should have resulted in $\frac{A_2^2}{A_1^2}=\frac{1}{\frac{2ghA_1^2}{q^2}+1}$ ).
–
exampleMar 30 '12 at 9:44