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.
 A: 
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}
A: Well, this is definitely a brute-force method but here's what I can think of:
Draw your triangle with P inside, along with the lines PA, PB, PC. There are 9 angles in total. There are also 4 unknown lengths, $x,y,z$, and the side-length of the equilateral triangle, $L$. In total, this is 13 unknowns.
Let's just call the six outer angles d,e,f,g,h,i and the 3 inner angles (around P) j,k,l.
It's not hard to come up with 13 equations: you know the angles making up the corners of the equilateral triangle add up to 60, i.e. $d+e = 60, f+g = 60, h+i = 60$, and the three on the inside add up to 360, i.e. $j+k+l = 360$. Also, the three "subtriangles" each total angle $180$. So that's 7 equations.
You can also use the sin and cosine rules of triangles incorporating the information about side lengths. This is an additional 3+3 = 6 equations.
In the end, there are 13 unknowns and 13 equations (which do not depend on one another). These can be solved by substitution/elimination to solve for L.
A: The relationship between $x,y,z$ and the side of the triangle, $a$ is interesting:
$$3(x^4+y^4 + z^4 + a^4) = (x^2+y^2+z^2 + a^2)^2 \tag{1}$$
Please see here, near reference $19$
If you put $z^2 = x^2 + y^2$ in $(1)$, you'll get
$$3(x^4 + y^4 + (x^2+y^2)^2 + a^4) = (2x^2 + 2y^2 + a^2)^2$$
Solving for $a$, you get
$$a = \pm \sqrt{x^2+y^2 \pm\sqrt{3}xy}$$
Consider only the positive roots.
A: Let's first come up with a general solution for these type of problems, so that they don't keep coming up with different length values in this forum.
Always construct the equilateral triangle $\bigtriangleup APA'$ and connect $A'$ to $C$. Since $\bigtriangleup ABC$ is equilateral we should immediately notice that $\bigtriangleup BAP$ and $\bigtriangleup CAA'$ are congruent. Our goal is to apply the law of cosines in $\bigtriangleup ACP$. To do this, we first note that we should find $\cos(\alpha)$, which can be done by  applying the law of cosines in $\bigtriangleup A'CP$. Now, we can apply the law of cosines in $\bigtriangleup ACP$ since we know how to evaluate $\cos(\alpha + 60°)$.
$\hspace{5cm}$
Ex. Problem

*

*What if $y^2=x^2+z^2-xz$ was given in the problem (instead of the given relationship); can you show that one of the angles around point $P$ is exactly $120°$ ?

Bonus

*

*What if we select a random point $P$ in a square and give the distances to three of the vertices, can you find the relationship between these distances and the length of a side of the square?


 $(a^2+y^2-x^2)^2+(a^2+y^2-z^2)^2=(2ay)^2$

$\hspace{5cm}$
