[guided]We must show $\bar{f}: X \to Y$ is uniformly continuous, meaning for every $\varepsilon > 0$ there exists $\delta > 0$ (independent of the points) such that $d_X(x, x') < \delta$ implies $d_Y(\bar{f}(x), \bar{f}(x')) < \varepsilon$.
The strategy is a three-segment estimate: connect $\bar{f}(x)$ to $\bar{f}(x')$ through approximating points in $D$, using the triangle inequality in $Y$ to split the distance into three controllable pieces.
Let $\varepsilon > 0$. Since $f: D \to Y$ is uniformly continuous, there exists $\delta_0 > 0$ such that
\begin{align*}
d_X(a, b) < \delta_0 \implies d_Y(f(a), f(b)) < \frac{\varepsilon}{3} \quad \text{for all } a, b \in D.
\end{align*}
Set $\delta := \delta_0 / 3$. This choice accounts for the three segments in the triangle inequality that follows.
Let $x, x' \in X$ with $d_X(x, x') < \delta$. Choose sequences $(d_k)$ and $(d_k')$ in $D$ with $d_k \to x$ and $d_k' \to x'$. Since these sequences converge, for all sufficiently large $k$ we have $d_X(d_k, x) < \delta$ and $d_X(d_k', x') < \delta$.
Now we bound $d_X(d_k, d_k')$ using the triangle inequality in $(X, d_X)$:
\begin{align*}
d_X(d_k, d_k') &\le d_X(d_k, x) + d_X(x, x') + d_X(x', d_k') \\
&< \delta + \delta + \delta \\
&= 3\delta = \delta_0.
\end{align*}
Since $d_k, d_k' \in D$ and $d_X(d_k, d_k') < \delta_0$, the uniform continuity of $f$ yields
\begin{align*}
d_Y(f(d_k), f(d_k')) < \frac{\varepsilon}{3}.
\end{align*}
We now pass to the limit. The metric $d_Y: Y \times Y \to [0, \infty)$ is continuous (as a map between [metric spaces](/page/Metric%20Space)), so
\begin{align*}
d_Y(\bar{f}(x), \bar{f}(x')) &= d_Y\!\left(\lim_{k \to \infty} f(d_k),\, \lim_{k \to \infty} f(d_k')\right) \\
&= \lim_{k \to \infty} d_Y(f(d_k), f(d_k')) \\
&\le \frac{\varepsilon}{3} < \varepsilon.
\end{align*}
The inequality $\le \varepsilon/3$ holds because the sequence $d_Y(f(d_k), f(d_k'))$ is eventually bounded above by $\varepsilon/3$, and a limit of a sequence bounded above by a constant is at most that constant.
Since $\delta = \delta_0/3$ depends only on $\varepsilon$ and not on the choice of $x, x' \in X$, this establishes uniform continuity of $\bar{f}$.[/guided]