Let A and B be real numbers such that Ax−5+B(x+1)=−3x2+12x+22x−5. What is A+B?
By long division, (-3x^2 + 12x + 22)/(x - 5) = -4x -4 + 9/(x - 5) = 9/(x - 5) + (-4)(x + 1), so A + B = 9 + (-4) = 5.