Note that

(a) 2X-2 = 2 (X-1)

and that

(b) X^2 + X - 2 = (X+2) * (X-1)

Since your function is (a) / (b), the (X-1) terms cancel, leaving you with the fraction 2 / (X+2), which you need to equate to a / (X+b).

So if I did the math right, it looks like a = b= 2.

- Steve J