Equilateral triangles $ABX$ and $BCY$ are constructed outside $\triangle ABC$, on sides $AB$ and $BC$ respectively. Points $X$, $Y$, $C$, $A$ lie on a circle. If $AB=3$ and $BC=5$, what is $CA$?
Let $\angle ABC=\beta$. Since $\triangle ABX$ is equilateral, $\angle ABX=60^\circ$; since $\triangle BCY$ is equilateral, $\angle CBY=60^\circ$. So $\angle ABY=\angle XBC=\beta+60^\circ$ (each is $\angle ABC$ plus one of the $60^\circ$ angles).
The rotation by $60^\circ$ about $B$ that takes $X$ to $A$ also takes $C$ to $Y$ (since $BX=BA$, $BC=BY$ and both angles are $60^\circ$ in the same direction). So it takes segment $XC$ to segment $AY$: $AY=XC$, and the lines $XC$ and $AY$ make an angle of $60^\circ$.
Let the diagonals $AY$ and $XC$ of the cyclic quadrilateral $AXYC$ meet at $P$. Then $\angle APX=60^\circ$ and $\angle APC=120^\circ$.
Inscribed angles on arc $XY$ give $\angle PAX=\angle PCY$, and $\angle APX=\angle CPY$, so $\triangle PAX\sim\triangle PCY$ with ratio $AX:CY=3:5$. Write $PA=3t$, $PX=3u$, $PC=5t$, $PY=5u$.
$AY=XC$ gives $3t+5u=3u+5t$, so $t=u$ and $PA=PX$. With $\angle APX=60^\circ$, $\triangle PAX$ is equilateral, so $PA=AX=3$ and $t=1$, $PC=5$.
By the law of cosines (theorem 27) in $\triangle APC$, $CA^2=3^2+5^2-2\cdot3\cdot5\cos120^\circ=9+25+15=49$.