Answer: 48 students total
======================================================
Step-by-step explanation:
If there were 7 boys and 5 girls, then we'd have the ratio of 7:5. The boys are listed first because of how your teacher mentions boys first to set up the ratio. The order is important. That means 7:5 is different from 5:7.
With 7 boys and 5 girls, we see that there are 7-5 = 2 more boys compared to girls, and not 8. The jump from 2 to 8 is "times 4", which means we'll need to multiply each gender count by 4 to get to the class size we want
boys: 7 ---> 7*4 = 28
girls: 5 ---> 5*4 = 20
Having 28 boys and 20 girls will lead to the ratio 28:20, and it reduces fully to 7:5 when we divide both parts by the GCF 4.
The total number of students is 28+20 = 48
-----------------
Here's another way we can solve.
x = number of girls
x+8 = number of boys, since there are 8 more
The ratio of boys to girls is 7:5, meaning,
(number of boys)/(number of girls) = 7/5
(x+8)/x = 7/5
(x+8)*5 = x*7 .... cross multiply
5x+40 = 7x
40 = 7x-5x
40 = 2x
2x = 40
x = 40/2
x = 20
There are x = 20 girls and x+8 = 20+8 = 28 boys. So 20+48 = 48 total.