We can divide a polygon into some triangles. The sum of angles of total number of triangle gives us total interior angle of a polygon.
We see that,
In the first case, we are losing 2 triangle according to our sides.
So we get total triangle = number of sides – 2.
And we know that, sum of angles of a triangle is 180◦.
Then total interior angle is = (number of sides – 2) * 180◦.
Finally we get,
Each interior angle = total interior angle/number of sides
As, number of sides = number of angles of a polygon.