If $f: (a, b) \to \Bbb R$ is uniformly continuous, then $g: [a, b] \to \Bbb R$ is continuous 
Fact 1: If $A$ is a subset of a metric space, $Y$ is a metric space, and $f: A \to Y$ is uniformly continuous, then if $\{x_n\}$ is Cauchy in $A$, then $\{f(x_n)\}$ is Cauchy in $Y$.
Fact 2: If $f: (a, b) \to \Bbb R$ is uniformly continuous, and the sequences $\{x_n\}$ and $\{x'_n\}$ are both in $(a, b)$ with $x_n \to b$ and $x'_n \to b$, and $f(x_n) \to y$ and $f(x'_n) \to y'$, then $y = y'$.
Problem: Using these facts and the completeness of $\Bbb R$, prove that if $f$ is uniformly continuous on $(a, b)$, then there exists $y_a, y_b \in \Bbb R$ so that if $g: [a, b] \to \Bbb R$ and $g(x) = \left\{
  \begin{array}{lr}
    f(x) & a<x<b\\
    y_a & x =a \\
    y_b & x =b
  \end{array}
\right.$
then $g(x)$ is continuous.

If $f$ is uniformly continuous, then by definition of convergent sequence and uniform continuity, we should have that $d(x_n, a) < \delta \implies d(f(x_n), f(a)$ but since $a \not\in (a,b)$, we should add $a$ so that we have $[a, b)$ since $\Bbb R$ is complete, every Cauchy sequence converges so we'll call $f(a) = y_a$. We can do the similar thing with $b$. So this will be our new function $g(x)$ and I think it is uniformly continuous (although the question only asks for regular continuity). But I think the problem is asking to prove that we can in fact add $a$ and $b$ and make it continuous, not just choose it. So I'm not sure about this part.

Let $x_n = a+\frac{1}{n}$. Then $f$ is uniformly continuous and $x_n$ is Cauchy, so by Fact 1 we know that $f(x_n)$ is Cauchy. By completeness of $\mathbb{R}$, there exists some $y_a \in \mathbb{R}$ such that $f(x_n) \to y_a$.
Similarly, let $y_b = \lim_{n \to \infty} f(b-\frac{1}{n})$.
Define $g$ as given in the problem, by setting it equal to $y_a$ at $a$ and $y_b$ at $b$, and $f$ in between.
To show that $g$ is continuous, let $y_n \to y \in [a,b]$. If $y \in (a,b)$, we know that eventually $y_n \in (a,b)$ so that eventually $g(y_n)=f(y_n)\to f(y) = g(y)$. If $y_n \to a$, then using Fact 2, we know that $\lim_n g(y_n) = \lim_n g(a+\frac{1}{n}) = y_a = g(a)$. Similarly if $y=b$, then $\lim_n g(y_n) = y_b=g(b)$.
Thus $g(y_n) \to g(y)$ whenever $y_n \to y$, so $g$ is continuous.
