We are given the expressions for \( A \) and \( B \). First, let's add \( A \) and \( B \):
\[
A + B = \frac{x+1}{x-1} + \frac{x-1}{x+1}.
\]
We need to find a common denominator, which is \( (x-1)(x+1) = x^2 - 1 \). So:
\[
A + B = \frac{(x+1)^2 + (x-1)^2}{(x-1)(x+1)}.
\]
Expanding the numerator:
\[
(x+1)^2 + (x-1)^2 = x^2 + 2x + 1 + x^2 - 2x + 1 = 2x^2 + 2.
\]
So:
\[
A + B = \frac{2(x^2 + 1)}{x^2 - 1}.
\]
Thus, the correct answer is \( \frac{2(x^2 + 1)}{x^2 - 1} \), which matches option (B).