Explanation:
First we need to create and expression.
If there are seven more boys than girls in the class, and we don't boys as variable "b", and girls as variable "g" then:
b=g+7 or g=b-7
Next, we know the class has 29 students comprised of boys and girls. With the information we have we can set up an equation and solve for boys.
29=b+g
29=b+(b-7)
29=2b-7
36=2b
b=18
to check our answer:
g=29-b
g=29-18
g=11, which is seven less than 18.