Show that if $u_n:=p(f(x_n),g(y_n))$ for all $n\in \mathbb{N}$, then the sequence $(u_n)$ converges. Let $(X,d)$ and $(Y,p)$ be metric spaces, where $X$ is complete, and define continuous functions $f,g:X \to Y$. If $(x_n)$ and $(y_n)$ are Cauchy sequences in $X$ and $u_n:=p(f(x_n),g(y_n))$ for all $n\in \mathbb{N}$, show that the sequence $(u_n)$ converges.
What I knew was:

*

*Since $f$ is continuous, say at $x_0\in X$, then for any $\varepsilon >0$, there exists $\delta _1>0$ such that for all $x\in X$ with $d(x,x_0)<\delta _1$, we have $p(f(x),f(x_0))<\varepsilon$. Similarly, since $g$ is continuous, say at $y_0\in X$, then for any $\varepsilon >0$, there exists $\delta _2>0$ such that for all $y\in X$ with $d(y,y_0)<\delta _2$, we have $p(f(y),f(y_0))<\varepsilon$.

*Since $X$ is complete, then $(x_n)$ and $(y_n)$ are convergent, say $x_n\to x$ and $y_n\to y$, where $x,y\in X$. This means that for any $\varepsilon >0$, there exists $N_1,N_2\in \mathbb{N}$ such that for all $n\geq N_1$ and $n\geq N_2$, we have $d(x_n,x)<\varepsilon$ and $d(y_n,y)<\varepsilon$, respectively.

I didn't know yet how to apply these facts to showing that $(u_n)$ is converges. Any helps? Thanks in advanced.
 A: By completeness of $X$, $(x_n)$ and $(y_n)$ converge to some $x$ and $y$ in $X$ respectively. Now, for any $\epsilon>0$, there exists $\delta>0$ such that for any $z$ within $\delta$ of $x$, $p(f(z),f(x))<\frac{\epsilon}{2}$, and for any $z$ within $\delta$ of $y$, $p(g(z),g(y))<\frac{\epsilon}{2}$ by continuity of $f$ and $g$. Then, let $N\in\mathbb{N}$ such that for all $n\geq N$, $d(x_n,x)<\delta$ and $d(y_n,y)<\delta$. Then, the triangle inequality yields
$$p(f(x_n),g(y_n))-p(f(x),g(y))\leq \big(p(f(x_n),f(x))+p(f(x),g(y))+p(g(y),g(y_n))\big)-p(f(x),g(y)),$$
and similarly,
$$p(f(x),g(y))-p(f(x_n),g(y_n))\leq \big(p(f(x),f(x_n))+p(f(x_n),g(y_n))+p(g(y_n),g(y))\big)-p(f(x_n),g(y_n)),$$
so
$$|p(f(x_n),g(y_n))-p(f(x),g(y))| \leq p(f(x_n),f(x))+p(g(y_n),g(y))<\epsilon$$
and thus $p(f(x_n),g(y_n))\rightarrow p(f(x),g(y))$.
A: Since $X$ is complete and both $(x_n)$ and $(y_n)$ are Cauchy sequences in $X$, then they are convergent in $X$. Let's say $x_n \to x \in X$ and $y_n \to y \in X$. Since both $f$ and $g$ are continuous in $X$, then they are continuous at every points in $X$. In particular, $f$ continuous at $x$ in $X$ and $g$ continuous at $y$ in $X$.
Now, since $x_n \to x$ and $f$ continuous at $x$ in $X$, then $f(x_n) \to f(x)$. Similarly, $g(y_n) \to g(y)$.
Claim: $p(f(x_n),g(y_n))$ converges to $p(f(x),g(y))$. Before we prove it, notice by definition of metric that
$$p(f(x_n),g(y_n)) \le p(f(x_n),f(x)) + p(f(x),g(y)) + p(g(y),g(y_n))$$
or
$$p(f(x_n),g(y_n)) - p(f(x),g(y)) \le p(f(x_n),f(x)) + p(g(y),g(y_n)), \qquad (1)$$
and
$$p(f(x),g(y)) \le p(f(x),f(x_n)) + p(f(x_n),g(y_n)) + p(g(y_n),g(y)$$
or
$$p(f(x),g(y)) - p(f(x_n),g(y_n)) \le p(f(x),f(x_n)) + p(g(y_n),g(y). \qquad (2)$$
Proof:
Let $\epsilon>0$ be given. Since $f(x_n) \to f(x)$, there exists $N_1 \in \Bbb N$ such that for all $n \ge N_1$, we have $p(f(x_n),f(x)) < \frac{\epsilon}{2}$. Similarly, since $g(y_n) \to g(y)$, there exists $N_2 \in \Bbb N$ such that for all $n \ge N_2$, we have $p(g(y_n),g(y)) < \frac{\epsilon}{2}$. Let $N=\max\{N_1,N_2\}$. Then $N \in \Bbb N$ and for all $n \ge N$, we have
\begin{align*}
|p(f(x_n),g(y_n)) - p(f(x),g(y))| &\le p(f(x_n),f(x)) + p(g(y_n),g(y)) \qquad \text{(By $(1)$ and $(2)$)} \\
&< \frac{\epsilon}{2} + \frac{\epsilon}{2} \\
&= \epsilon.
\end{align*}
Hence, $p(f(x_n),g(y_n))$ converges to $p(f(x),g(y))$, as desired. Q.E.D.
