just use remainder theorem, two eqs, two unknowns.
----------
when x^2+ax-b is divided by x+2, the remainder is -7.
sub x = -2, get 4-2a-b = -7
---------------------------------
when ax^2-bx+1 is divided by x-2, the remainder is 3.
sub x = 2, get 4a-2b+1 = 3
then do it yourself