There are 78 students in total.
If there are 2 fewer girls than boys, and that is 5% less than boys, then that means:
b - 2 = b - ( b * 0.05 )
"b" is the number of boys
This equation proves:
2 = b * 0.05
Divide both sides of the equation by 0.05 to isolate the variable.
b = 40
There are 40 boys.
40 - 2 = 38, so there must be 38 girls.
5% of 40 (or 40 * 0.05) is 2, which also proves that there are 5% less girls than boys.
40 (boys) + 38 (girls) = 78 students total