Solving $\sqrt{x^2+ay^2} - \sqrt{x^2+y^2} = z$ for $x$ Suppose I have an expression as follows
$$\sqrt{x^2+ay^2} - \sqrt{x^2+y^2} = z$$
How would I go about rearranging this to deduce a value for x?
Thanks for the help.

Bring $\sqrt{x^2+y^2}$ to the right
$\sqrt{x^2+ay^2}=z+\sqrt{x^2+y^2}$
Square both sides
$x^2+ay^2= z^2+2z\sqrt{x^2+y^2}+x^2+y^2$
Get rid of $x^2$ on both sides, group together the $y^2$ terms and bring $z^2$ to the left
$(a-1)y^2-z^2=2z\sqrt{x^2+y^2}$
Square both sides again to get rid of the $\sqrt{}$ sign on the right
$\left((a-1)y^2-z^2\right)^2=4z^2(x^2+y^2)$
...at least that’s how Stewart Calculus does it.
