In your equation x^2 + 10x + 24 = (x +a)(x + b), if you were to multiply out, or FOIL your (x +a)(x + b), you would multiply the First terms (which gives x^2), Outer terms (which gives bx), Inner terms (which gives ax), and Last terms (which gives ab). Written together, this would give:
x^2 + bx + ax + ab
This is now in the form of your original equation where 'ab' is an integer that must equal 24, so we know that the integers a and b must multiply to give you 24. But we also know that bx + ax has to equal 10x, meaning the integers a and b must also add to give you 10.
So we're looking for multiples of 24 that also add to give you 10.
Let's start by giving all the multiples of 24: 1 and 24; 2 and 12; 3 and 8; 4 and 6
Of all of those multiples, only 4 and 6 would add to give you 10. So the possible values of b are 4 (in which the value of 'a' would be 6), or 6 (in which the value of 'a' would be 4).
So b can equal 4 or 6