I know this question has been answered before, but I have a slightly different different question.
I saw the solution of this question in my book and the author has solved it by substituting $x-1=y$ and then equating the coefficients of $y^2$, $y^1$ and $y^0$ to $A(y+1)^2$, $B(y+1)^1$ and $C$.
My question is why do we have to substitute $x-1=y$ and why can't equate coefficients of $x^2$, $x^1$ and $x^0$ to $A$, $B$ and $C$ without substituting? Thanks in advance.
We do not have to use that substitution, but it makes calculations somewhat easier to follow. The idea is the same as writing $\,(x+1)^n=\big((x-1)+2\big)^n\,$ then retaining just the last three terms of the binomial expansion, since the rest have $\,(x-1)^3\,$ as a factor.
That doesn't work, because the Euclidean division is $\,(x+1)^n=(x-1)^3 q(x) + ax^2+bx+c\,$. It is straightforward to determine the coefficients of $\,x^0,x^1,x^2\,$ on the LHS, but not so easy on the other side since you don't know the quotient $\,q(x)\,$ which also contributes to the $\,x^0,x^1,x^2\,$ terms on the RHS, and calculating $\,q(x)\,$ would take some non-trivial (and not directly necessary) work.