For the triangle is right, the Pythagorean theorem holds; namely,

Now, we need to remember the formula for the square of a sum:

Then, the first equality becomes

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)