Extend
\(f\) and
\(g\) to
\(x_0\) by setting
\(f(x_0)=g(x_0)=0\text{.}\) The assumed limits make these extensions continuous at
\(x_0\text{.}\) Since differentiability implies continuity at every other point, both extensions are continuous on
\(I\text{.}\)
Let
\((x_n)\) be any sequence in
\(I \setminus \{x_0\}\) such that
\(x_n \to x_0\text{.}\) For each
\(n\text{,}\) the closed interval with endpoints
\(x_n\) and
\(x_0\) lies in
\(I\text{.}\) On this interval, the extensions are continuous and are differentiable in its interior. By
Theorem 5.3.6, there is a point
\(c_n\) strictly between
\(x_n\) and
\(x_0\) such that
\begin{equation*}
f'(c_n)(g(x_n)-g(x_0))
=g'(c_n)(f(x_n)-f(x_0)).
\end{equation*}
Since \(f(x_0)=g(x_0)=0\text{,}\) and both \(g(x_n)\) and \(g'(c_n)\) are nonzero, we may divide to obtain
\begin{equation*}
\frac{f(x_n)}{g(x_n)}=\frac{f'(c_n)}{g'(c_n)}.
\end{equation*}
Moreover,
\begin{equation*}
0 \lt |c_n-x_0| \lt |x_n-x_0| \to 0,
\end{equation*}
so \(c_n \to x_0\) through points different from \(x_0\text{.}\) The assumed limit of the derivative quotient therefore gives
\begin{equation*}
\frac{f(x_n)}{g(x_n)}=\frac{f'(c_n)}{g'(c_n)} \to L.
\end{equation*}
Since \((x_n)\) was arbitrary, the sequential criterion for limits yields the result. The same argument applies when \(L=+\infty\) or \(L=-\infty\text{,}\) using the corresponding sequential criterion for an infinite limit.