Trouble with factorising a polynomial I'm supposed to show that:  
$$y=\frac{5(x-1)(x+2)}{(x-2)(x+3)} = P + \frac{Q}{(x-2)} + \frac{R}{(x+3)}$$  
and the required answers are: $$ P=5, Q=4, R=-4 $$  
I tried to solve this with partial fractions like so:  
$$5(x-1)(x+2) = A(x+3) + B(x-2)$$  
$\implies$ $A$=4, $B$=-4
$\implies$ $Q$=4, R=-4  
But where does $P$=5 come from?
Or should I have first multiplied out the numerator and denominator and then used long division to solve?
 A: $$\frac{5(x-1)(x+2)}{(x-2)(x+3)} = P + \frac{Q}{(x-2)} + \frac{R}{(x+3)}$$  gives
$$5(x-1)(x+2)=P(x-2)(x+3)+Q(x+3)+R(x-2)........(1)$$
Now put $x=2, x=-3,x=0$ respectively on both sides of $(1)$ to get,  $Q=4,R=-4,P=5$ respectively. Hence you can reach the desired result.
A: You are given the wrong expression. After some calculation I figure out that in order for these two expressions to be equivalent,
$$\frac{5(x-1)(x-2)}{(x-2)(x+3)} =  5 + \frac{4}{(x-2)} + \frac{-4}{(x+3)}$$ 
instead of having $\frac{5(x-1)(x-2)}{(x-2)(x+3)}$, it should be
$$\frac{5(x-1)(x+2)}{(x-2)(x+3)}$$
Now solve it again it would work well.
My approach to solving it is 
$$\frac{5(x-1)(x+2)}{(x-2)(x+3)} = \frac{5x^2+5-10}{(x-2)(x+3)} =\frac{\frac{5x^2+5-10}{(x-2)}}{(x+3)}$$
$$\frac{\frac{5x^2+5-10}{(x-2)}}{(x+3)} = \frac{5x+15+\frac{40}{(x-2)}}{(x+3)}$$
$$\frac{5x+15+\frac{40}{(x-2)}}{(x+3)} = 5+\frac{40}{(x-2)(x+3)}$$
$$5+\frac{40}{(x-2)(x+3)}=5 + \frac{4}{(x-2)} + \frac{-4}{(x+3)}$$
A: You don't need to do any long division. In the expression
$$y = \frac{N(x)}{D(x)} = \frac{5(x-1)(x+2)}{(x-2)(x+3)}$$
The numerator $N(x) = 5(x-1)(x+2)$ and denominator $D(x) = (x-2)(x+3)$ 
are polynomials of degree $2$. Since the roots of $D(x)$ are simple,
$y$ can be rewritten in the form:
$$y = P(x) + \frac{Q}{(x-2)} + \frac{R}{(x+3)}$$
where $P(x)$ is a polynomial of degree $\deg N(x) - \deg D(x) = 2 - 2 = 0$, i.e. a constant. To evaluate the 3 coefficients, you can evaluate both side at 3 different
values of $x$: the two roots of $D(x)$ and $\infty$:
$$\begin{align}
P &= \lim_{x\to\infty} \frac{N(x)}{D(x)} = 5\\
Q &= \lim_{x\to 2} (x-2)\frac{N(x)}{D(x)} = \lim_{x\to 2}\frac{5(x - 1)(x+2)}{x+3} = \frac{5(2 - 1)(2+2)}{2+3} = 4\\
R &= \lim_{x\to -3}(x+3)\frac{N(x)}{D(x)} = \lim_{x\to-3}\frac{5(x-1)(x+2)}{x-2} = \frac{5(-3-1)(-3+2)}{-3-2} = -4
\end{align}$$
