4. $a, b$ are the roots of the equation $x^{2}+(m-5) x+7=0$. Then $\left(a^{2}+m a+7\right)\left(b^{2}+m b+7\right)=$ ( ).
(A) 365
(B) 245
(C) 210
(D) 175
$\begin{array}{l}\text { 4.D. } \\ \text { Given } a b=7, a^{2}+m a+7=5 a, b^{2}+m b+7=5 b, \text { then } \\ \text { therefore, }\left(a^{2}+m a+7\right)\left(b^{2}+m b+7\right)=25 a b=175 \text {. }\end{array}$