Find the value of c for which the expression

x^3 + (9-c)x^2 -c^2x -5c^2 +25c-100 is divisible by x+4 but not by x-5.

a little synthetic division shows that the remainder when divided by (x+4) is -c^2+9c-20

so, you want that to be zero. c = 4 or 5

do similarly for division by (x-5). and pick the answer that meets the requirements.