When the polynomial x3+2x2−5ax−7 is divided by (x−1), the remainder is A and when the polynomial x3+ax2−12x+16 is divided by (x+2), the remainder is B. Find the value of 'a' if 2A+B=0.