We can assume that the number of boys is X and the number of girls is 2/3x-2 (the class size is 5/3x-2); When the number of boys decreases by one, the class size becomes (5/3x-2- 1), and the number of girls can be expressed as 1/3(5/3x-2- 1)+3. Because the number of girls has not changed, the equation is obtained:
2/3x-2 = 1/3(5/3x-2- 1)+3
Solving this equation gives x=36.
The number of girls is 36×2/3=24 (persons).