The total angles in a polygon is 180 (n -2) where n is the number of sides.
A traingle has 3 sides. using the formula 180 x (3-2) = 180
So
X + Y + Y = 180
X + 2Y = 180 ...eq1
A pentagon has 5 sides, using the formula
180 x (5-2) = 540.
All the Y adds up to 540.
10Y = 540
Y = 54.
Use Y = 54 and sub into eq1
X + 2(54) =180
X = 180 - 2(54)
X = 180 -108
X =72
So X is 72
and Y is 54