x^3+x-2=(Ax+B)(x^2+2)+(Cx+D)(x^2+1)
expand so
x^3+x-2=Ax^3+2Ax+Bx^2+2B+Cx^3+Cx+Dx^2+D
so 1x^3+x-2=(A+C)x^3+(B+D)x^2+(2A+C)x+(2B+D)
so (set them equal to the coefficients)
A+C=1
B+D=0
2A+C=1
2B+D=-2
you have two equations for 2 variables in both cases let A=1-C for example and substitue in so 2(1-C)+C=1 so 2-C=1 C=1 so A=0
i'm doing this on the computer i could be wrong though..my math that is