For x.
All the right triangles are similar, so
.. hypotenuse/(short side) = x/6 = 6/(x -9)
Multiplying by the product of denominators gives
.. x(x -9) = 36
Two factors of 36 that differ by 9 are 12 and 3, so we have
.. x = 12
For y, we can use the Pythagorean theorem.
y^2 +6^2 = 12^2
y^2 = 144 -36 = 108
y = √108 = √(36*3)
y = 6√3