Let
Put
A(x2-x+1)+(Bx+C)(x+1)=1
Now putting x+1=0
X=-1
A(1+1+1)+C(0)=1
By equating the coefficient of x2 and constant term, A+B=0
A+C+=1
From the equation(1), we get,