Solve the following system of equations for $x,y,z$ as $a,b,c\in\Bbb{R}$
\begin{align*}xy+yz&=a^2\tag{1}\\xz+xy&=b^2\tag{2}\\yz+zx&=c^2\tag{3}\end{align*}
My try: Assume that $x,y,z\ne 0$ (it is easy to check the case where some are zero).
Subtract first equation from second equation we will get the system \begin{align*}xz-yz&=b^2-a^2\\xz+yz&=c^2\end{align*} Adding and subtract both equations we get $$x=\frac{b^2+c^2-a^2}{2z},y=\frac{a^2+c^2-b^2}{2z}$$I tried to set the expressions into one of the equations and get value of $z$, but it got quiet messy.
Is there any easier way of solving the system?
Any help will be appreciated, thanks!
Adding we get $$2(xy+yz+zx)=a^2+b^2+c^2$$
$$2xy=a^2+b^2+c^2-2c^2=a^2+b^2-c^2$$ etc.
Muliplying we get $$8x^2y^2z^2=\prod_{\text{cyc}}(a^2+b^2-c^2)$$
$$xyz=\pm\sqrt{\dfrac{\prod_{\text{cyc}}(a^2+b^2-c^2)}8}$$
and $xy=\dfrac{a^2+b^2-c^2}2$
$$z=\dfrac{xyz}{xy}=?$$