5. Given that the graph of the parabola $y=a x^{2}+b x+c$ passes through the points $(1,4)$ and $(2,7)$, and the axis of symmetry is the line $x=k$, with $|k| \leqslant 1$. Then the range of values for $a$ is ( ).
(A) $\frac{3}{5} \leqslant a \leqslant 3$
(B) $a \geqslant 3$
(C) $a \leqslant \frac{3}{5}$
(D) $a<0$
5. (A).

According to the problem, we have
$$
\left\{\begin{array}{l}
a+b+c=4, \\
4 a+2 b+c=17 .
\end{array}\right.
$$
(2) - (1), we get $3 a+b=3$, then $b=3-3 a$.

The axis of symmetry of the parabola is given by $x=-\frac{b}{2 a}$.
From $\left|-\frac{b}{2 a}\right| \leqslant 1$, we know $-1 \leqslant-\frac{b}{2 a} \leqslant 1$.
When $a>0$, we have $-2 a \leq \cdots \vdots \leq \leqslant 2 a$,
which means $-2 a: 33 a-3 \leqslant 2 a$,
$$
\therefore \frac{3}{5} \leqslant a \leqslant 3 \text {. }
$$

When $a<0$, we have $-2 a \geqslant 3 a-3 \geqslant 2 a$, this system of inequalities has no solution. Therefore, the range of values for $a$ is $-\frac{3}{5} \leqslant a \leqslant 3$.