I was reading this post regarding the Extension of a Uniformly Continuous Function between Metric Spaces. I understood how you're supposed to extend the function and why said extension is well defined but I'm having trouble with the proof that the extended function is uniformly continuous. Specifically, in Carlos Pinzon's answer, where he says
Let $\varepsilon > 0$. Since $f$ is uniformly continuous, there exists $\delta > 0$ such that $D(f(a),f(b))<\varepsilon/3$ for every $a,b \in S$ with $d(a,b)<\delta$.
Let $a,b \in \overline{S}$ with $d(a,b)<\delta/3$.
In the first line, since $f$ is uniformly continuous on $S$, we can guarantee the existence of a $\delta > 0$ such that $d(a,b) < \delta$ implies $D(f(a),f(b)) < \epsilon$
But why can we claim that in the second line? since $a,b \in \overline{S}$ our $f$ doesn't guarantee anything because it may not be defined in $a$ or $b$.
Also, there's Venkata Karthik Bandaru's answer lower in the post which I also saw but I found it a bit more confusing.
To be fair, I would've preferred to comment on Carlos' answer instead of making a whole post but I can't comment on other people's posts yet :(
Thanks in advance!