You can write the given problem as
x^6-6x^5+10x^4-17x^3++8x^2-5x+1=A(x-1)^2(x^2+1)+B(x)(x1-1)^2(x^2+1)^2+C(x)(x-1)(x^2+1)^2+d(X)(x^2+1)+(Ex+f)(X)(x-1)^3(x^2+1)+(Gx+H)(x)(x-1)^3
Substituting x=0, you get A
Substituting x = 1 you get D
When you compare coefficients of same power of x, you get one equation.
In the given problem, there is no tern (x^2 +1) in the denominator, because E and F must be zero.
To find G, equate the coefficient of x^5 on both sides.
TO find H, equate the coefficient of x^4 on both sides.