[ A(1-x+x^2) + B(x+2) ] / [ (x+2)(1-x+x^2) ]
You probably knew that, but this is really, really important. Not getting it right now will confuse you a great deal later.However, now you have this as your numerator:
A(1-x+x^2) + B(x+2) [Eqn *]
Look again at your original problem- what do you want the numerator to be?
- Expand out Eqn * to remove the brackets.
- What values can you assign to A and B to make Eqn * be the numerator you want?
As a hint, A and B are not simply numbers.