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

Let $$f(x)=Q1(x-3)+7$$ and $$f(x)=Q2(x+6)+22$$ (where Q1 and Q2 are some functions of x, since degree of f can be 2) 
So, if you substitute x=3 and x=-6 in above equations respectively, you get f(3)=7 and f(-6)=22 
Now, let $$f(x)=Q3(x-3)(x+6)+(ax+b)$$ where (ax+b) is remainder
(remainder may be a constant or a linear in x because of degree restriction over f(x))  
Substitute x=3 $$f(3)=0+(3a+b)  $$
Substitute x=-6 $$f(-6)=0+(-6a+b)$$
So, 3a+b=7 and -6a+b=22 
Solving, $$a= \frac{-5}{3}$$ and $$b=12  $$
Remainder is $$ \frac{-5x}{3}+12$$
