Another way to find A and B is
u = Au + A + Bu +2B
Now gather the coefficents for each power and make and equation, for example
1 = A + B for power of 1
0 = A + 2B for power of 0
Now you can use substitution or elimination to get your A and B values