For the triangle is right, the Pythagorean theorem holds; namely,
![(x+5)^2=x^2+(x+4)^2](https://img.qammunity.org/2023/formulas/mathematics/college/zlf4m781v5orwgxafyklrcagwvd3vw1k8q.png)
Now, we need to remember the formula for the square of a sum:
![(a+b)^2=a^2+2ab+b^2](https://img.qammunity.org/2023/formulas/mathematics/high-school/4wp4nbc9fbx6r68qmr14kcon9sub55nk8b.png)
Then, the first equality becomes
![\begin{gathered} x^2+10x+25=x^2+x^2+8x+16,\text{ above identity} \\ 10x+25=x^2+8x+16, \\ x^2-2x-9=0, \end{gathered}](https://img.qammunity.org/2023/formulas/mathematics/college/o4q3mtl0psyy6wwr5hz35jinmyk7eogc3v.png)
Now, we need to calculate the roots of the polynomial on the left. Let's use the general formula:
![\begin{gathered} x=\frac{-(-2)\pm\sqrt[]{(-2)^2-4(1)(-9)}}{2}, \\ x=\frac{2\pm\sqrt[]{4+36}}{2}, \\ x=(2)/(2)\pm\frac{\sqrt[]{40}}{2}, \\ x_1=1+\sqrt[]{10},x_2=1-\sqrt[]{10} \end{gathered}](https://img.qammunity.org/2023/formulas/mathematics/college/t5dv2pv0w6ljkbt82f9wtm7dujeb57zz8x.png)
Note that x_2 is negative. It doesn't work for negative lengths makes no sense. Then,
![x=1+\sqrt[]{10}\approx4.2](https://img.qammunity.org/2023/formulas/mathematics/college/zhm3yawpsu4a9q85xsk7yo9jkew2th432m.png)
![x+4=(1+\sqrt[]{10})+4\approx8.2](https://img.qammunity.org/2023/formulas/mathematics/college/5k1fwi68knh4hatzn4l44h8vt9ytosuf4y.png)
![x+5=(1+\sqrt[]{10})+5\approx9.2](https://img.qammunity.org/2023/formulas/mathematics/college/n99rerdjsosvhgnk9v0x1h33xv37l5ni62.png)