# How to find the length of a right triangle?

I want to find the measure of $x$ in a right triangle $ABC$ where $AD$ is the height and measures $12$, the height forms a right angle with the base, the base measures $BD=x$ and $BC=x+7$.

How do I find $x$?

I'm lost. Thank you.

-

Note that the triangle $ADB$ is similar to triangle $CDA$. Hence, we get that $$\dfrac{AD}{DB} = \dfrac{CD}{DA} \implies \dfrac{12}{x} = \dfrac{7}{12}$$ Hence, $x = \dfrac{144}{7}$.
If $CD$ is $x$ and $BD$ is $x+7$, the same procedure gives us $$\dfrac{12}{x+7} = \dfrac{x}{12} \implies x^2 + 7x = 144 \implies (x+16)(x-9) = 0$$ Since $x = CD > 0$, we get that $x=9$.