Equilateral triangle $ABC$ with $P$ inside, $PA= x$, $PB=y$, $PC=z$ and $z^2 =x^2+y^2$. Find side length of $ABC$ 
$ABC$ is an equilateral triangle $ABC$ with $P$ inside it such that $PA= x$, $PB=y$, $PC=z$. If $z^2 =x^2+y^2$ , find the length of the sides of $ABC$ in terms of $x$ and $y$?

If $z^2=x^2+y^2$ then how can I find measures of angles around $P$ so that the sides can be expressed in terms of $x$ and $y$. I've tried everything I can think of.


Rotate $\triangle BCP$ counter-clockwise 60$^\circ$ around the point $B$ to $\triangle BAQ$ and connect $PQ$. Then, $BPQ$ is an equilateral triangle and $APQ$ is a right triangle due to $x^2+y^2=z^2$.  Apply the cosine rule to $\triangle BPA$ to obtain the side $s$
\begin{align}
s^2 & = AP^2+BP^2 - 2AP\cdot BP\cos\angle APB \\
&= x^2 + y^2 - 2x y \cos 150^\circ\\
&= x^2 + y^2 +\sqrt3x y
\end{align}
