[proofplan]
We prove continuity of $f$ at an arbitrary point $x_0 \in X$ by an $\varepsilon/3$ argument. [Uniform convergence](/page/Uniform%20Convergence) supplies one index $N$ for which $f_N$ is uniformly close to $f$ on all of $X$, and the [continuity](/page/Continuity) of this single approximating function $f_N$ supplies a neighbourhood of $x_0$. The triangle inequality then transfers the local control of $f_N$ to local control of $f$.
[/proofplan]
[step:Fix a point and split the oscillation of $f$ through one approximating function]
Fix $x_0 \in X$ and $\varepsilon > 0$. Let $N \in \mathbb{N}$ be arbitrary for the moment. For every $x \in X$, adding and subtracting $f_N(x)$ and $f_N(x_0)$, then applying the triangle inequality in $\mathbb{R}$, gives
\begin{align*}
|f(x) - f(x_0)|
&= |f(x) - f_N(x) + f_N(x) - f_N(x_0) + f_N(x_0) - f(x_0)| \\
&\leq |f(x) - f_N(x)| + |f_N(x) - f_N(x_0)| + |f_N(x_0) - f(x_0)|.
\end{align*}
[/step]
[step:Choose one approximant that is uniformly close to $f$]
Since $f_n \to f$ uniformly on $X$, the definition of uniform convergence applied with tolerance $\varepsilon/3 > 0$ gives an index $N \in \mathbb{N}$ such that, for every $n \geq N$ and every $x \in X$,
\begin{align*}
|f_n(x) - f(x)| < \frac{\varepsilon}{3}.
\end{align*}
Taking $n = N$, we obtain, for every $x \in X$,
\begin{align*}
|f_N(x) - f(x)| < \frac{\varepsilon}{3}.
\end{align*}
In particular, the same estimate also holds at the fixed point $x_0$:
\begin{align*}
|f_N(x_0) - f(x_0)| < \frac{\varepsilon}{3}.
\end{align*}
[guided]
We now use the hypothesis that the convergence is uniform, not merely pointwise. The definition of uniform convergence says that for every positive tolerance there is a single index after which the approximation is good at every point of the domain. Applying this definition with the positive tolerance $\varepsilon/3$ gives an index $N \in \mathbb{N}$ such that, for every $n \geq N$ and every $x \in X$,
\begin{align*}
|f_n(x) - f(x)| < \frac{\varepsilon}{3}.
\end{align*}
The phrase “for every $x \in X$” is the essential part: the index $N$ is chosen before choosing the nearby point $x$. Taking $n = N$ gives
\begin{align*}
|f_N(x) - f(x)| < \frac{\varepsilon}{3}
\end{align*}
for every $x \in X$. Because $x_0 \in X$, the same uniform estimate also applies at $x_0$:
\begin{align*}
|f_N(x_0) - f(x_0)| < \frac{\varepsilon}{3}.
\end{align*}
Thus the first and third terms in the triangle-inequality decomposition are controlled by the same approximating function $f_N$.
[/guided]
[/step]
[step:Use continuity of the chosen approximant at the fixed point]
The chosen index $N$ belongs to $\mathbb{N}$, so the hypothesis gives that the function $f_N: X \to \mathbb{R}$ is continuous. Applying the definition of continuity of $f_N$ at the point $x_0$ with tolerance $\varepsilon/3 > 0$, there exists $\delta > 0$ such that every $x \in X$ satisfying $d(x, x_0) < \delta$ also satisfies
\begin{align*}
|f_N(x) - f_N(x_0)| < \frac{\varepsilon}{3}.
\end{align*}
[/step]
[step:Combine the three estimates to prove continuity of $f$]
Let $x \in X$ satisfy $d(x, x_0) < \delta$. Using the triangle-inequality decomposition from the first step, the uniform estimates for $f_N - f$, and the continuity estimate for $f_N$, we obtain
\begin{align*}
|f(x) - f(x_0)|
&\leq |f(x) - f_N(x)| + |f_N(x) - f_N(x_0)| + |f_N(x_0) - f(x_0)| \\
&< \frac{\varepsilon}{3} + \frac{\varepsilon}{3} + \frac{\varepsilon}{3} \\
&= \varepsilon.
\end{align*}
Therefore, for the fixed point $x_0 \in X$ and every $\varepsilon > 0$, there exists $\delta > 0$ such that $d(x, x_0) < \delta$ implies $|f(x) - f(x_0)| < \varepsilon$. Hence $f$ is continuous at $x_0$. Since $x_0 \in X$ was arbitrary, $f$ is continuous on $X$.
[/step]