For this triangle in particular, we can use the special rules of a 30-60-90 triangle
This says:
The opposite side of 30° is: x
The opposite side of 60° is: x * sqrt(3)
The opposite side of the 90° is: 2x
We have our side length for 90° so we just have to work backwards
To find our 30° side length we must divide by 2
8/2 = 4
Which means your y = 4
Now that we have our 30° side length we can just multiple it by sqrt(3)
That means your x = 4 sqrt(3)