Solution:
Let the first polygon have 5x sides and the second polygon have 5x sides.
In the second polygon, the number of sides should be 4x.
Angle of an n-sided regular polygon = [(n-2)/n] radian, we know.
Therefore, the angle of the first polygon = [(5x-2)/5x] 180o
Similarly, the angle of the second polygon = [(4x-1)/4x] 180o
Thus, we can write:
$ \left[ \left( 5x-2 \right)/5x \right]\text{ }{{180}^{o}}~-\left[ \left( 4x-1 \right)/4x \right]\text{ }{{180}^{o}}~=\text{ }9 $
$ {{180}^{o}}~\left[ \left( 4\left( 5x-2 \right)-5\left( 4x-2 \right) \right)/20x \right]\text{ }=\text{ }9 $
Upon cross multiplying we get,
$ \left( 20x-8-20x\text{ }+\text{ }10 \right)/20x\text{ }=\text{ }9/180 $
$ 2/20x\text{ }=\text{ }1/20 $
$ 2/x\text{ }=\text{ }1 $
$ x\text{ }=\text{ }2 $
Terefore, the number of sides in the first polygon = 5x = 5(2) = 10
And the number of sides in the second polygon = 4x = 4(2) = 8