This is a 30-60-90 triangle. In a 30-60-90 triangle, the longer leg is √3 times longer than the shorter leg, and the hypotenuse is twice the length of the shorter leg.
Longer leg: shorter leg * √3
Hypotenuse: shorter leg * 2
In the diagram, the shorter leg would be 18/2 = 9. x is the longer leg, so x would be 9√3. y is the hypotenuse, so y would be 9*2 = 18.
x (longer leg) = 9 * √3
y (hypotenuse) = 9 * 2 = 18
