The above answer is correct but i would like to give a qualitative point of view. To being we need to identify the variables, which are just place holders. In other words, because we don't know how many boys and girls there are, we need to temporarily give them "imaginary amounts" like B for boy & G for girl. Now we know the total amount of boys & girls in the class so we can first write the equation:
B + G = 25........... Think about it this way, it says total kids are 25, and the kids can either be boys & girls, so if we add total boys & total girls we would get 25 people.
Now the other piece of information given is that there are 5 more girls than boys. People tend to get confused/ frustrated because they are in words but as a general rule.....MORE is + while LESS is -. so because it says 5 MORE we know its 5 +. Than continuing on, it says 5 MORE GIRLS than boys, so we can write the equation
5 + B = G.
Another way to think about this is which one has more, girls or boys? Because it says 5 more girls than boys, we know there are more girls than boys so that's why we made it = G. Now we got 2 equations to work with where you can plug in one into the other:
B + G =25
5 + B = G
Use the 1st equation and substitute in G for 5 + B to get ........... B + (5+B) = 25.
Than its simple Algebra from here
B + 5 + B = 25
2B + 5 = 25
2B = 20
divide 2 both sides
B = 10.......If there are 10 boys that means there are 15 girls (using first equation 10 + G = 25, so G has to be 15)
G = 15