Basically let's represent the number of girls with x.
There are 6 more boys than girls, so x+6
Let's sum it all up
x+x+6=40
Collect like terms;
2x+6=40
2x=40-6
2x= 34
Divide both sides by 2
x=17
17+6=23
Therefore there are 17 girls in the class and 23 boys.
please mark Brainliest.