8.58 If $m, n, p$ and $q$ are real numbers and $f(x)=m x+n, \quad g(x)=p x+$ $q$, then the condition for the equation $f(g(x))=g(f(x))$ to have a solution is
(A) $m, n, p$ and $q$ can be any real numbers.
(B) If and only if $m=p$ and $n=q$.
(C) If and only if $m q-n p=0$.
(D) If and only if $n(1-p)-q(1-m)=0$.
(E) If and only if $(1-n)(1-p)-(1-q)(1-m)=0$.
(27th American High School Mathematics Examination, 1976)
[Solution] For any real number $x$, the following equations are equivalent:
$$
\begin{aligned}
f(g(x)) & =g(f(x)), \\
m(p x+q)+n & =p(m x+n)+q,
\end{aligned}
$$

or
thus
$$
m p x+m q+n=m p x+n p+q .
$$
$$
n(1-p)=q(1-m) \text {, }
$$

Therefore, the correct choice is $(D)$.