Solve for $l$
I tried to solve this for $l$ with trigonometry, but I stopped at $l^2+4-2l\cdot \cos(x)=16, l^2 + 4 +2l\cdot \sin(x)=25$, where $x$ is the angle of the left triangle between 4 and $l$.
So I've tried with Heron's, and got stuck with some square roots...
According to WolframAlpha, the answer must be something around 3.71374
Any ideas?
------SOLVED----------
Okay, so, thanks to Narasimham I've seen that I took cosine formula wrong, and thanks to cosmo5 I've been able to solve it, here's the solution:
Start with cosine formula \begin{matrix} 5^2 & = & l^2+4-2\cdot2\cdot l\cdot \cos(270^\circ - \alpha))\\ 4^2 & = & l^2+4-2\cdot2\cdot l \cdot \cos(\alpha) \end{matrix}
Rearrange teh two equation \begin{matrix} 441-42l^2+l^4 & = &16l^2\cdot\sin^2(\alpha))\\ 144-24l^2+l^4 & = &16l^2 \cdot \cos^2(\alpha) \end{matrix}
find this quadratic formula \begin{matrix} 585-66l^2+2l^4=16l^2 \end{matrix}
and then found this solutions \begin{matrix} +\sqrt{\dfrac{41+\sqrt{511}}{2}}\\ +\sqrt{\dfrac{41-\sqrt{511}}{2}}\\ -\sqrt{\dfrac{41+\sqrt{511}}{2}}\\ -\sqrt{\dfrac{41-\sqrt{511}}{2}} \end{matrix}
Then, discart the negative ones \begin{matrix} \sqrt{\dfrac{41+\sqrt{511}}{2}}\\ \sqrt{\dfrac{41-\sqrt{511}}{2}} \end{matrix}
On
Mathematica; Using Cosine formula of a triangle, three unknowns and three variables. Numerical solution.al->0.829607,bt->0.140595,L->3.03271},{al->2.4004,bt->1.71139,L->5.63938}}`
I have checked by approximate
Geogebraconstruction. Two cases arise when the node is inside and the other when it is outside the square. Rough sketch attached including all trigonometric parameters.To me it is convincing enough.