Answer
$A=\frac{a+b}{2}$
$B=\frac{a-b}{2}$
Work Step by Step
Step 1. Combine the right side of the equation to obtain:
LHS=$\frac{A(x+1)+B(x-1)}{(x-1)(x+1)}=\frac{(A+B)x+(A-B)}{x^2-1}$
Step 2. Compare the above results with the left side to get:
\begin{cases} A+B=a \\A-B=b \end{cases}
Step 3. Add up the two equations to get $2A=a+b$, thus $A=\frac{a+b}{2}$
Step 4. Plug-in the above result to one of the equations to get $B=a-A=\frac{a-b}{2}$