Edge length of an equilateral triangle if distances from a point $P$ to its vertices is given A point $P$ is located inside an equilateral triangle and is at a distance of 5, 12, and 13 from its vertices. Compute the edge length of the triangle.
The answer is $\sqrt{169 + 60\sqrt(3)}$.
If $s$ is the edge length of the triangle, and if $x$ is the measure of the angle with vertex at $P$ and with sides of lengths 5 and 12, and if $y$ is the measure of the angle with vertex at $P$ and with sides of lengths 5 and 13, according to the Law of Cosines,
\begin{equation*}
s^{2} = 169 - 120\cos(x)
\end{equation*}
\begin{equation*}
s^{2} = 194 - 130\cos(y)
\end{equation*}
and since $\cos(360 - (x + y)) = \cos(x + y)$,
\begin{equation*}
s^{2} = 313 - 312\cos(x+y)
\end{equation*}
So,
\begin{align*}
\cos{x} = - \frac{s^{2} - 169}{120} , \\
\cos{y} = - \frac{s^{2} - 194}{130} , \\
\cos(x+y) = - \frac{s^{2} - 313}{312} .
\end{align*}
For any real numbers $\theta$ and $\phi$,
\begin{equation*}
\bigl[\cos{\theta}\cos{\phi} - \cos(\theta + \phi)\bigr]^{2}
= \sin^{2}\theta\sin^{2}\phi
= \bigl(1 - \cos^{2}\theta\bigr)\bigl(1 - \cos^{2}\phi\bigr) .
\end{equation*}
So,
\begin{align*}
&\left[\frac{s^{2} - 169}{120} \cdot \frac{s^{2} - 194}{130} + \frac{s^{2} - 313}{312}\right]^{2} \\
&\qquad \qquad = \left(1 - \left(\frac{s^{2} - 169}{120}\right)^{2}\right)\left(1 - \left(\frac{s^{2} - 194}{130}\right)^{2}\right)
\end{align*}
or equivalently, by multiplying by $(120^{2})(130^{2})312$,
\begin{align*}
&\Bigl[312(s^{2} - 169)(s^{2} - 194) + (120^{2})(130^{2})(s^{2} - 313)\Bigr]^{2} \\
&\qquad \qquad
= 312 \Bigl((120^{2})(130^{2}) - 130^{2}(s^{2} - 194)\Bigr)
\Bigl((120^{2})(130^{2}) - 120^{2}(s^{2} - 194)\Bigr) .
\end{align*}
How is the quartic equation in the variable $s$ to be solved?


Let $ABC$ be an equilateral triangle. $P$ is a point inside $\triangle ABC$ such that $PA=5$, $PB=12$ and $PC=13$. Rotate $C$ and $P$ about $A$ through $60^\circ$ to $B$ and a point $X$. Rotate $A$ and $P$ about $B$ through $60^\circ$ to $C$ and a point $Y$. Rotate $B$ and $P$ through $60^\circ$ to $A$ and a point $Z$.
Since $\triangle ABX\cong\triangle ACP$, $\triangle BCY\cong\triangle BAP$ and $\triangle CAZ\cong\triangle CBP$, 
$$[AXBYCZ]=2[\triangle ABC]$$
Note that $\triangle APX$, $\triangle BPY$ and $\triangle CPZ$ are equilateral triangles of sides $5$, $12$ and $13$ respectively. Also, $\triangle PBX$, $\triangle YPC$ and $\triangle AZP$ are right-angled triangles of sides $5$-$12$-$13$.
\begin{align*}
[\triangle ABC]&=\frac{1}{2}\left[\frac{1}{2}(5)^2\sin60^\circ+\frac{1}{2}(12)^2\sin60^\circ+\frac{1}{2}(13)^2\sin60^\circ+3\times\frac{1}{2}(5)(12)\right]\\
&=\frac{169\sqrt{3}}{4}+45
\end{align*}
So,
\begin{align*}
\frac{1}{2}(AB)^2\sin60^\circ&=\frac{169\sqrt{3}}{4}+45\\
AB^2&=169+60\sqrt{3}
\end{align*}
