Ratio:
3 boys / 5 girls
total = 8 people
5 girls / 8 people
Proportion:
5 girls / 8 people = x girls / 40 people
8x = 200
x = 25 girls
40 - 25 = 15 boys
25 - 15 = 10 more girls than boys
There are 10 more girls than boys in the class.
Hope this helps!! :)