Step 1: Find $f(x)$ from the first equation.
Combine the right side: $\dfrac{2}{x-2}-\dfrac{1}{x-1}=\dfrac{2(x-1)-(x-2)}{(x-1)(x-2)}=\dfrac{x}{(x-1)(x-2)}$. Comparing, $f(x)=x$.
Step 2: Build the second expression.
Now $f(x)+\dfrac{x f(x)}{(x-1)(x-2)}=x+\dfrac{x^2}{(x-1)(x-2)}$.
Step 3: Split the fraction.
Write $x^2=(x-1)(x-2)+3x-2$, so $\dfrac{x^2}{(x-1)(x-2)}=1+\dfrac{3x-2}{(x-1)(x-2)}$.
Step 4: Apply partial fractions.
Break $\dfrac{3x-2}{(x-1)(x-2)}=\dfrac{1}{x-1}+\dfrac{2}{x-2}$.
Step 5: Read off $g$, $A$, $B$.
The whole thing is $x+1+\dfrac{2}{x-2}+\dfrac{1}{x-1}$. Matching $g(x)+\dfrac{A}{x-2}+\dfrac{B}{x-1}$ gives $g(x)=x+1$, $A=2$, $B=1$.
Step 6: Compute $g(A+B)$.
Here $A+B=3$, so $g(3)=3+1=4$. \[ \boxed{4} \]