Can you show me where I went wrong in this problem? And what i should correct

The given partial fraction is:
[tex]\frac{x^2+x+1}{x(x-1)^2}[/tex]There are some constants, A, B, and C such that:
[tex]\frac{x^2+x+1}{x(x-1)^2}=\frac{A}{x}+\frac{B}{x-1}+\frac{C}{(x-1)^2}[/tex]Multiplying both sides by x(x - 1)², it follows:
[tex]x^2+x+1=A(x-1)^2+Bx(x-1)+Cx[/tex]Substituting x=1 it follows that:
[tex]\begin{gathered} 1+1+1=C \\ \text{Therefore,} \\ C=3 \end{gathered}[/tex]Substituting C=3 into the equation, it follows that:
[tex]x^2+x+1=A(x-1)^2+Bx(x-1)+3x[/tex]Expand the right side of the equation:
[tex]x^2+x+1=A(x^2-2x+1)^{}+B(x^2-x)+3x[/tex]By comparing coefficients of x², we have that:
[tex]A+B=1-------(1)[/tex]By comparing coefficient of constant, it follows that:
[tex]A=1---------(2)[/tex]Substitute A=1 into equation (1), it follows that:
[tex]\begin{gathered} 1+B=1 \\ \text{Therefore, } \\ B=0 \end{gathered}[/tex]Subtracting equation (2) from equation (1), it follows that:
[tex]\begin{gathered} 2B=2 \\ B=1 \end{gathered}[/tex]Therefore, the partial fraction decomposes to:
[tex]\frac{1}{x}+\frac{3}{(x-1)^2}[/tex]z