The easiest way to find x is to use this proportion: 3 / x = x / (3 + 9)
3 / x = x / 12
cross-multiply: x2 = 36
find the square root: x = 6 (you can ignore the negative value)
You can use the same idea to find y: 9 / y = y / (9 + 3)
9 / y = y / 12
y2 = 108
y = sqrt(108)