Let x = number of boys
Then x+107 = number of girls
The total number in the class is 379:
Finish using basic algebra....
Informally, without algebra....
(1) Take away the "extra" 107 girls; that leaves 379-107 = 272 students, with equal numbers of boys and girls.
(2) So the number of boys is 272/2 = 136.
The problem only asked for the number of boys, so you are done.
Obviously, if they had asked also for the number of girls, it would be 136, plus the 107 that you took away earlier.