Let G8 and B8 be the number of girls and boys in Class VIII.
Let G9 and B9 be the number of girls and boys in Class IX.
We are given:
We need to find the value of $G8$ (or $G9$). Let $G = G8 = G9$.
From the total students, we can express the number of boys in terms of $G$:
Substitute these expressions into the ratio equation $\frac{G8}{B8} = \frac{B9}{G9}$:
$ \frac{G}{450 - G} = \frac{360 - G}{G} $
Cross-multiply:
$ G \times G = (450 - G) \times (360 - G) $
$ G^2 = 450 \times 360 - 450G - 360G + G^2 $
$ G^2 = 162000 - 810G + G^2 $
Subtract $G^2$ from both sides:
$ 0 = 162000 - 810G $
Rearrange to solve for $G$:
$ 810G = 162000 $
$ G = \frac{162000}{810} $
$ G = \frac{16200}{81} $
$ G = 200 $
The number of girls in each class ($G8$ and $G9$) is 200.