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.

Here I propose an alternative way to solve it for the sake of curiosity.
More precisely, what about polar coordinates? If we set $x = r\cos(\theta)$ and $y = r\sin(\theta)$, one gets that
\begin{align*}
\sqrt{x^{2} +  ay^{2}} - \sqrt{x^{2}+y^{2}} = z & \Longleftrightarrow r\sqrt{\cos^{2}(\theta) + a\sin^{2}(\theta)} - r = z\\\\
& \Longleftrightarrow r = \frac{z}{\sqrt{\cos^{2}(\theta) + a\sin^{2}(\theta)} - 1}
\end{align*}
Consequently, one has that
\begin{align*}
y = \frac{z\sin(\theta)}{\sqrt{\cos^{2}(\theta) + a\sin^{2}(\theta)} - 1} & \Rightarrow y\sqrt{\cos^{2}(\theta) + a\sin^{2}(\theta)} = y + z\sin(\theta)\\\\
& \Rightarrow y^{2}(\cos^{2}(\theta) + a\sin^{2}(\theta)) = y^{2} + 2yz\sin(\theta) + z^{2}\sin^{2}(\theta)\\\\
& \Rightarrow y^{2}(1 + a\sin^{2}(\theta)) = y^{2}(1 + \sin^{2}(\theta)) + 2yz\sin(\theta) + z^{2}\sin^{2}(\theta)\\\\
& \Rightarrow a\sin^{2}(\theta)y^{2} = y^{2}\sin^{2}(\theta) + 2yz\sin(\theta) + z^{2}\sin^{2}(\theta)\\\\
& \Rightarrow a\sin(\theta)y^{2} = y^{2}\sin(\theta) + 2yz + z^{2}\sin(\theta)\\\\
& \Rightarrow \sin(\theta)(ay^{2} - y^{2} - z^{2}) = 2yz\\\\
& \Rightarrow \sin(\theta) = \frac{2yz}{y^{2}(a-1) - z^{2}}
\end{align*}
Once you know $\sin(\theta)$, you do also know $\cos(\theta)$. Consequently, we obtain the value of $x$.
It is worth emphasizing that one must check for each values of $\theta$ and $a$ the above-mentioned expressions make sense.
