When p(x)=x^3+ax+b is divided by x-1 the remainder is 2. When px is divided by x-2 the remainder is 1. Find the values of a and b?