Answer
$x = 3$
Work Step by Step
We have a right triangle with the altitutde dividing the triangle into two smaller triangles; therefore, these three triangles are all similar to one another.
If these triangles are similar, then their corresponding sides are proportional.
We are given either values or expressions for the lengths of the shorter leg and hypotenuse of the big triangle and the lengths of the shorter leg and hypotenuse of the smallest triangle. Let's set up a proportion to find the value of $x$:
$\frac{x}{x + 3} = \frac{x + 3}{12}$
Cross multiply to get rid of the fractions:
$12x = (x + 3)(x + 3)$
Distribute to simplify:
$12x = x^2 + 3x + 3x + 9$
Subtract $12x$ from each side of the equation:
$0 = x^2 + 3x + 3x - 12x + 9$
Combine like terms:
$x^2 - 6x + 9 = 0$
Factor the quadratic equation:
$(x - 3)(x - 3) = 0$
Set each factor equal to $0$:
$x - 3 = 0$
Add $3$ to each side to solve for $x$:
$x = 3$