Example 5. Let the cubic curve $f(x)=x^{3}+a x^{2}+b x+c$ be tangent to the parabola $g(x)=x^{2}+1$ at point $P(1,2)$, and the given cubic curve also touches the $x$-axis at point $Q$. Try to find $a$, $b$, $c$, and the coordinates of point $Q$.
Let the curve $y=f(x)$ be tangent to the $x$-axis at point $Q\left(x_{1}, 0\right)$, then it is clear that $f\left(x_{1}\right)=0$, thus
$$
f(x)=\left(x-x_{1}\right) \varphi(x),
$$

where $\varphi(x)$ is a quadratic trinomial with the leading coefficient equal to 1.
Since the curve $y=f(x)$

is tangent to the $x$-axis at point $\left(Q x_{1}, 0\right)$, i.e., the slope of the tangent line to $y=f(x)$ at point $Q$ is zero, we have
$f^{\prime}\left(x_{1}\right)=0$. From (18)
we know
$$
\begin{aligned}
& f^{\prime}(x)=\varphi(x)+\left(x-x_{1}\right) \varphi^{\prime}(x), \\
\therefore \quad & f^{\prime}\left(x_{1}\right)=\varphi\left(x_{1}\right)=0, \\
\therefore \quad & \varphi(x)=\left(x-x_{1}\right)\left(x-x_{2}\right), \\
& f(x)=\left(x-x_{1}\right)^{2}\left(x-x_{2}\right) .
\end{aligned}
$$

where $x_{2}$ is a real number.
Since the curve $y=f(x)$ is tangent to $g(x)=x^{2}+1$ at point $(1, 2)$, from (16) and (19), we have
$$
f(1)=g(1)=2,
$$

i.e., $\left(1-x_{1}\right)^{2}\left(1-x_{2}\right)=2$;
and it is easy to see that $x_{1} \neq 1, x_{2} \neq 1$.
From (19), we have
$$
\begin{aligned}
f^{\prime}(x) & =\left(x-x_{1}\right)\left(3 x-x_{1}-2 x_{2}\right), \\
\therefore \quad f^{\prime}(1) & =\left(1-x_{1}\right)\left(3-x_{1}-2 x_{2}\right) .
\end{aligned}
$$

Since $g^{\prime}(x)=2 x, g^{\prime}(1)=2$ and (17), we have $f^{\prime}(1)=$ $g^{\prime}(1)$. Therefore
$$
\left(1-x_{1}\right)\left(3-x_{1}-2 x_{2}\right)=2 \text {. }
$$

From (20), we get $x_{2}=1-\frac{2}{\left(1-x_{1}\right)^{2}}$ and substituting into
(21), and simplifying, we get
$$
x_{1}^{3}-3 x_{1}^{2}+x_{1}-3=0,
$$

i.e.,
$$
\begin{array}{l}
\left(x_{1}-3\right)\left(x_{1}^{2}+1\right)=0 . \\
\therefore x_{1}=3 .
\end{array}
$$

Substituting into (20), we get $x_{2}=\frac{1}{2}$.
$$
\begin{array}{r}
\therefore \quad f(x)=(x-3)^{2}\left(x-\frac{1}{2}\right) \\
=x^{3}-\frac{13}{2} x^{2}+12 x-\frac{9}{2} .
\end{array}
$$

Thus, $a=-\frac{13}{2}, b=12, c=-\frac{9}{2}$.
And the coordinates of point $Q$ are $(3,0)$. (Figure 4)