The triangles are similar. Specifically the largest triangle and the smaller triangle on the right side
We can form the proportion below and solve for x
x/(x+3) = (x+3)/12
12*x = (x+3)(x+3)
12x = x^2+6x+9
x^2+6x+9 = 12x
x^2+6x+9-12x = 0
x^2-6x+9 = 0
(x-3)^2 = 0
x-3 = 0
x = 3
Final Answer: 3