Using the method of alligation, the ratio of the number of boys to the number of girls is determined by the difference between the girls' average and the overall average compared to the difference between the boys' average and the overall average. Calculate the differences as (42 - 37) for the boys and (37 - 34) for the girls, which yields 5 and 3 respectively, establishing a ratio of 5 boys to 3 girls. Given that there are 25 boys in the class, divide 25 by 5 to find the value of one ratio unit, and then multiply that result of 5 by 3 to find that there are 15 girls.