Can we use either $$ \frac{x-5}{(x-2)^2 (x+1)} = \frac{A}{(x-2)^2} + \frac{B}{(x-2)} + \frac{C}{(x+1)} $$
or equivalently,
$$ \frac{x-5}{(x-2)^2 (x+1)} = \frac{A'x+B'}{(x-2)^2} + \frac{C}{(x+1)} $$
since $(x-2)^2$ is a quadratic factor. My teacher only told us to "use the equation inside the bracket", what is the reason behind this?
The question as stated was incorrect. The correct form with 3 unknowns A, B and C
$$f(x) = (x−5)/[(x−2)^2(x+1)]= A/(x−2)^2 + B/(x−2) + C/(x+1).\tag {a}$$
which is equivalent to
$$f(x) = (Bx+(A-2B))/(x−2)^2 + C/(x+1).\tag {b}$$
where we have A' = B and B' = A-2B. are defined as an alternative form eq (b)
Solution for A, B, and C are obtained from eqs (2), (3), and (1).
$$C = {(x-5)/[(x-2)^2]}|_{x=-1} = - 6/9 = -2/3.\tag {1}$$
$$A = {(x-5)/(x+1)}|_{x=2} = - 1.\tag {2}$$
(x−5)/[(x−2)^2(x+1)] + 1/(x-2)^2 = [(x-5)+(x+1)]/[(x−2)^2(x+1)] = 2/[(x-2)(x+1)]
Hence we have 2/[(x-2)(x+1)] = B/(x-2) + C/(x+1)
Solve for B,
$$B = [2/(x+1)]|_{x=2} = 2/3.\tag {3}$$
Substituting the known coefficients A, B and C, eq (a) now becomes
$$f(x) = (x−5)/[(x−2)^2(x+1)] = - 1/(x−2)^2 + 2/[3(x−2)] - 2/[3(x+1)].\tag {a}$$