Dividing polynomial $f(x)$ by $x-3$ and $x+6$ leaves respective remainders $7$ and $22$. What's the remainder upon dividing by $(x-3)(x+6)$? If I have a polynomial $f(x)$ and is divided by $(x- 3)$ and $(x + 6)$ the respective remainders are $7$ and $22$, what is the remainder when $f(x)$ is divided by $(x-3)(x + 6)$?
I tried it by doing:
$$f(x) =(x-3)(x+6)q(x) + ax+b $$
And, $a$ and $b$ comes out to be $-\dfrac53$ and $12$ respectively.
But I'm not sure how to solve any further.
And kindly explain exactly how it's done

$f(x)=(x-3)a(x)+7\Rightarrow f(3)=7$
$f(x)=(x+6)b(x)+22\Rightarrow f(-6)=22$
If you can write $f$ is of the form $f(x) =(x-3)(x+6)q(x) + ax+b$. 
Solution is so easy:
$$f(3)=3a+b=7$$
$$f(-6)=-6a+b=22$$
Hence,  $a=-\dfrac53$ and $b=12$
