Yes, you are correct.
From the image, we can see 3 triangles, the large triangle and the two triangles that make the larger triangle.
All 3 of these triangles are similar since they're angle measurements are the same (can be proven by geometry).
We can gather the following information from the given information.
We know the hypotenuse to corresponding leg ratio must be equal since these two triangles are similar. Thus, we have the equation:
12/x = x/9
Using the cross product property gives us:
x² = 9 × 12
x² = 108
Taking the square root of both sides gives us:
x = √108
= 6 √3
Thus, your answer is correct. Great job!
Let me know if you need any clarifications, thanks!