Solution: Everyone can't see the color of the hat on their heads. There are x boys, and each boy sees as many white hats as red hats, so the number of boys looking at girls is (X- 1). That is, * * * has (X- 1) girls. Every girl sees twice as much white as red, so the number of boys each girl sees is
2. According to the number of boys, we can get X=2(X-2) and X=4.
That is four boys, three girls and seven people.