since it is a triangle the angles will add to 180
so
90 + 52 + (3y + 2) = 180
now we can solve, combine 90 & 52 then subtract them from 180
142 + (3y + 2) = 180
(3y + 2) = 38
subtract 2
3y = 36
divide by 3
y = 12
now for X, we know the angle of the corner is 90° because it is a rectangle, and we know the other angle is 38° so
90-38 = missing angle
90 - 38 = 52°
now divide 52 by 4 to get x
4x = 52
x = 13
so y= 12 and x= 13