The 30º-60º-90º triangle is a special case you'd do well to remember, because the legs always occur in the same ratio to one another. As your picture shows (I'm guessing "SL" stands for short leg?), the sides labeled 4, y and x occur in a ratio of 1 to √3 to 2.
This means
sin(30º) = SL/(2*SL) = 1/2
tan(30º) = SL/(√3*SL) = 1/√3
(and also cos(30º) = (√3*SL)/(2*SL) = √3/2, though you don't really need that here)
So in this triangle, x and y satisfy
sin(30º) = 4/x
tan(30º) = 4/y
This comes straight from the definitions of sine and tangent. Then
4/x = 1/2 ==> x = 8
4/y = 1/√3 ==> y = 4√3