In order to get to the given solution, we must correct an error in the transcription. I don't know if you copied it from your book/worksheet incorrectly, or if it was given to you with the error already made. What is written here is the * symbol, meaning times, or multiplication, and what is needed for the solution to be correct is the - symbol, meaning minus, or subtraction. That is to say:
Given \(\displaystyle \displaystyle \frac{x}{y}=\frac{1+r^2}{1-r^2}\), \(\displaystyle \displaystyle r=\frac{\sqrt{x-y}}{\sqrt{x+y}}\:\text{where}\:\sqrt{x+y}\ne 0\:\text{and}\:y\ne 0\)
Given \(\displaystyle \displaystyle \frac{x}{y}=\frac{1+r^2}{1\ast r^2}\), \(\displaystyle \displaystyle r=\frac{\sqrt{y}}{\sqrt{x-y}}\:\text{where}\:\sqrt{x-y}\ne 0\:\text{and}\:\sqrt{y}\ne 0\)