x2+5x+ax2−10x−24=x2+5x+a(x−12)(x+2)
If the fraction is equal to the quotient of two linear functions, then either (x - 12) or (x + 2) divides x^2 + 5x + a.
By factor theorem,
122+5⋅12+a=0 or (−2)2+5(−2)+a=0a=−204 or a=6
Therefore S={−204,6}. Sum of elements of S is -198.
Remarks: The statement of factor theorem is as follows.
Let p(x) be a polynomial such that (x−a) divides p(x). Then p(a)=0.