The given function is:
\[
f(x) = \frac{x - 5}{x^2 - 3x + 2}.
\]
First, factor the denominator:
\[
x^2 - 3x + 2 = (x - 1)(x - 2).
\]
So the function becomes:
\[
f(x) = \frac{x - 5}{(x - 1)(x - 2)}.
\]
We are given that the range of \( f(x) \) is \( (-\infty, \alpha) \cup (\beta, \infty) \), meaning the function has two asymptotes at \( x = 1 \) and \( x = 2 \), and it takes all real values except between \( \alpha \) and \( \beta \).
Now, to find \( \alpha \) and \( \beta \), consider the vertical asymptotes and behavior of the function at extreme values. By solving for the limiting value of \( f(x) \) as \( x \to 1^+ \), \( x \to 1^- \), \( x \to 2^+ \), and \( x \to 2^- \), we can find that:
\[
\alpha = 2 \quad \text{and} \quad \beta = 1.
\]
Finally, the value of \( \alpha^2 + \beta^2 \) is:
\[
\alpha^2 + \beta^2 = 2^2 + 1^2 = 4 + 1 = 3.
\]
Thus, the correct answer is \( 3 \).