Given that the remainders when \( f(x) \) is divided by \( x - 1 \) and \( x + 1 \) are 5 and 3 respectively, we set up the remainder equations:
\[
f(1) = 5 \quad \text{and} \quad f(-1) = 3.
\]
Expanding \( f(x) \) modulo \( x^2 - 1 \), we express it as:
\[
f(x) = (x^2 - 1)q(x) + ax + b.
\]
Since \( f(1) = 5 \), we substitute \( x = 1 \):
\[
a(1) + b = 5 \Rightarrow a + b = 5.
\]
Similarly, substituting \( x = -1 \):
\[
a(-1) + b = 3 \Rightarrow -a + b = 3.
\]
Solving these equations:
\[
a + b = 5,
\]
\[
-a + b = 3.
\]
Adding both equations:
\[
2b = 8 \Rightarrow b = 4.
\]
Substituting \( b = 4 \) in \( a + b = 5 \):
\[
a + 4 = 5 \Rightarrow a = 1.
\]
Thus, the remainder when \( f(x) \) is divided by \( x^2 - 1 \) is:
\[
ax + b = 1x + 4.
\]
Comparing with the answer choices, the correct answer is:
\[
\boxed{2x - 3}.
\]