Solve for \(A\) and \(C\) using Heaviside's method.
\[ \dfrac{5x^2-15x+7}{(x+1)(x-2)^2}\cdot (x+1)=\dfrac{5x^2-15x+7}{(x-2)^2} \] \[ A=\dfrac{5x^2-15x+7}{(x-2)^2}\Huge|_{\normalsize x=-1}\normalsize=3 \] \[ \dfrac{5x^2-15x+7}{(x+1)(x-2)^2}\cdot (x-2)^2=\dfrac{5x^2-15x+7}{x+1} \] \[ C=\dfrac{5x^2-15x+7}{x+1}\Huge|_{\normalsize x=2}\normalsize=-1 \]Thus
\[ \dfrac{5x^2-15x+7}{(x+1)(x-2)^2}=\dfrac{3}{x+1}+\dfrac{B}{x-2} - \dfrac{1}{(x-2)^2}\]Clearing the fractions gives
\( \begin{eqnarray*} 5x^2-15x+7&=&3(x-2)^2+B(x+1)(x-2)-(x+1)\\ &=&(3+B)x^2-(13+B)x+(11-2B) \end{eqnarray*} \)So \(3+B=5,\, 13+B=15\), and \(11-2B=7\).
Therefore \(B=2\) and the decomposition is
\[ \dfrac{5x^2-15x+7}{(x+1)(x-2)^2}=\dfrac{3}{x+1}+\dfrac{2}{x-2} - \dfrac{1}{(x-2)^2}\]