Source: 1976 Euclid Part A Problem 10
-----
If $f$, $g$, $h$, and $k$ are functions and $a$ and $b$ are numbers such that $f(x)=(x-1)g(x)+3=(x+1)h(x)+1=(x^2-1)k(x)+ax+b$ for all $x$, then $(a,b)$ equals

$\textbf{(A) } (-2,1) \qquad \textbf{(B) } (-1,2) \qquad \textbf{(C) } (1,1) \qquad \textbf{(D) } (1,2) \qquad \textbf{(E) } (2,1)$
Given the equation:
\[ f(x) = (x-1)g(x) + 3 = (x+1)h(x) + 1 = (x^2-1)k(x) + ax + b \]
for all \( x \), we need to find the values of \( a \) and \( b \).

1. **Substitute \( x = 1 \) into the equation:**
   \[
   f(1) = (1-1)g(1) + 3 = 0 \cdot g(1) + 3 = 3
   \]
   \[
   f(1) = (1+1)h(1) + 1 = 2h(1) + 1
   \]
   \[
   f(1) = (1^2-1)k(1) + a \cdot 1 + b = 0 \cdot k(1) + a + b = a + b
   \]
   Equating the expressions for \( f(1) \):
   \[
   3 = 2h(1) + 1 \implies 2h(1) = 2 \implies h(1) = 1
   \]
   \[
   3 = a + b
   \]

2. **Substitute \( x = -1 \) into the equation:**
   \[
   f(-1) = (-1-1)g(-1) + 3 = -2g(-1) + 3
   \]
   \[
   f(-1) = (-1+1)h(-1) + 1 = 0 \cdot h(-1) + 1 = 1
   \]
   \[
   f(-1) = ((-1)^2-1)k(-1) + a \cdot (-1) + b = 0 \cdot k(-1) - a + b = -a + b
   \]
   Equating the expressions for \( f(-1) \):
   \[
   1 = -2g(-1) + 3 \implies -2g(-1) = -2 \implies g(-1) = 1
   \]
   \[
   1 = -a + b
   \]

3. **Solve the system of linear equations:**
   \[
   \begin{cases}
   a + b = 3 \\
   -a + b = 1
   \end{cases}
   \]
   Add the two equations:
   \[
   (a + b) + (-a + b) = 3 + 1 \implies 2b = 4 \implies b = 2
   \]
   Substitute \( b = 2 \) into \( a + b = 3 \):
   \[
   a + 2 = 3 \implies a = 1
   \]

Thus, the values of \( a \) and \( b \) are \( a = 1 \) and \( b = 2 \).

The final answer is \( \boxed{ (1, 2) } \)