Given a metric space $X$ , show that :
$X$ is complete $\iff$ For every complete metric space $Y$ and continuous $f:X\rightarrow Y$ : $f$ maps Cauchy sequences to Cauchy sequences.
general-topologymetric-spaces
Given a metric space $X$ , show that :
$X$ is complete $\iff$ For every complete metric space $Y$ and continuous $f:X\rightarrow Y$ : $f$ maps Cauchy sequences to Cauchy sequences.
Well, the limits of some of the Cauchy sequences in $X$ may not exist (because $X$ needs not be a complete space), so you need to specify what you mean by "the set of limits". For example, suppose your space consists precisely of points $x_n, n\in\mathbb N$, with $$d(x_n,x_{n+k})=\frac1{2^n}+\frac1{2^{n+1}}+\dots+\frac1{2^{n+k-1}}.$$ There is no limit $p$ to add to $X$.
Of course, you can say "Ah, well, then pick a new point $p$ and declare it to be the limit of the sequence". OK, fine. What is the distance between $x_{17}$ and $p$, in that case?
Now, consider the same example as in the first paragraph, and note that the sequence $x_3,x_6,x_9,\dots$ is Cauchy. Your description says we need to add a new limit point $p'$ corresponding to it. Is $p'\ne p$?
This suggests that the problem is slightly more complicated than anticipated: If two Cauchy sequences are to have the same limit, we better make sure that we add the same limit point for both of them. How do we know that two different sequences ought to have the same limit?
Let's say that we manage to solve all those obstacles, that is: We indeed add to $X$ new points, one for each Cauchy sequence in $X$, making sure that if two distinct Cauchy sequences are to converge to the same thing, they indeed do. We also somehow manage to extend the distance function so the new space is metric, and $X$ is dense in it. How do we know that there is not a Cauchy sequence of new points for which we haven't yet added a limit point? Because if there are such sequences, then we ought to iterate the procedure. For how long? Does it ever end? Now, if there are no such sequences, that is certainly part of what the proof needs to show.
All that being said, you are on the right track. First we need to deal with what things we are to add. Of course, new points, and the new points can be anything we want, but let's try to choose something specific so we can keep track of them. A natural thing to do is to exploit the fact that if two Cauchy sequences are to have the same limit, then we better add the same point as limit of both of them. One way to take advantage of this is to introduce an equivalence relation on Cauchy sequences, saying that two such sequences are equivalent "if they are to have the same limit". Then as the new points we can just add the equivalence classes of this equivalence relation.
How do we check that two distinct sequences have the same limit? Luckily, this is easy: Say the sequences are $x_1,x_2,\dots$ and $y_1,y_2,\dots$ Define a new sequence by $$z_1=x_1,z_2=y_1,z_3=x_2,z_4=y_2,z_5=x_3,\dots$$ Then the two sequences are equivalent iff the new sequence so described is Cauchy. It does not matter here whether there are repetitions in this sequence of $z_i$. (Naturally, there are things to verify here, mainly that this is indeed an equivalence relation.)
A small problem at this point is that some sequences may be Cauchy and already have a limit in $X$. The easiest solution is to ignore them. It may not be the prettiest solution, because now your space consists of two rather different creatures: Elements of $X$, and equivalence classes of Cauchy sequences of elements of $X$, that do not converge to an element of $X$. But it is a fine solution (meaning: It works). The standard approach is to avoid this separation of creatures, and simply take as the new space the collection of all equivalence classes of Cauchy sequences. (If a sequence converges to $x\in X$, we identify its equivalence class with $x$, so rather than the isometry being inclusion, at the end we have something a tad more elaborate.)
Now comes the second problem: How do we make this thing into a metric space? Luckily, there is an easy solution as well: If $x_n\to p$, then for any $k$, we have that $d(x_k,x_n)\to_{n\to\infty}d(x_k,p)$. So we can use this as the way to define the new distances: Given an equivalence class $p$, let $x\in X$. We define $d(x,p)$ as $\lim_{n\to\infty}d(x,x_n)$, where $ x_1,x_2,\dots$ is some Cauchy sequence in the equivalence class $p$. OK. Maybe not so easy: We need to check that this definition gives us a positive real number (as opposed to $0$ [excluded since the $x_n$ do not converge in $X$, so $x$ better not be their limit], or $+\infty$, or to the case when the limit does not exist). We also need to check that this number is independent of the sequence $x_1,x_2,\dots$ we picked. A similar idea gives us how to define $d(p,q)$ when both $p,q$ are equivalence classes.
Of course, one still needs to verify this indeed gives us a metric space.
Finally, we need to check that this is complete, and $X$ is dense in it. But I'll stop here, as I'm pretty sure the construction in your book is following the same lines.
(There are rather different presentations of the construction, that look superficially different and start from very different ideas, but the space obtained at the end is essentially unique, in the sense that any two constructions will be isometric via an isomorphism that identifies their copies of $X$. Naturally, this also takes an argument.)
Completeness is not needed here:
Proposition. If $X$, $Y$ are any metric spaces and $f \colon X \to Y$ maps Cauchy-sequences to Cauchy-sequences, then $f$ is continuous.
Let $x_n \to x$ in $X$. Then the sequence $(\xi_n)$ given by $$ \xi_n := \begin{cases} x & n \text{ odd} \\ x_k & n = 2k \text{ even} \end{cases} $$ is Cauchy. Therefore $\eta_n := f(\xi_n)$ is Cauchy, too. As $\eta_n$ is given by $$ \eta_n = \begin{cases} f(x) & n \text{ odd} \\ f(x_k) & n = 2k \text{ even} \end{cases} $$ we must have $f(x_n) \to f(x)$: For if $\epsilon > 0$ is given, there is $N$ such that $|\eta_n - \eta_m| < \epsilon$ for $n,m \ge N$. Let $K$ such that $2K \ge N$, and $k \ge K$ we have $$ |f(x_k) - f(x)| = |\eta_{2k} - \eta_{2k+1}| < \epsilon. $$ Hence, $f$ is continuous.
One can show, that in addition, every uniformly continuous map maps Cauchy-sequences to Cauchy-sequences, but both reversions are not true: There are maps to map Cauchy-sequences to Cauchy-sequences that aren't uniformly continuous (the example that comes to my mind being $\mathbf R \to \mathbf R$, $x \mapsto x^2$) and maps that are continuous, but don't map Cauchy-sequences to Cauchy-sequences to Cauchy-sequences (my favorite example here being $(0,\infty) \to \mathbf R$, $x \mapsto x^{-1}$; the Cauchy-sequence $(n^{-1})$ is mapped to $(n)$). Note that in the latter case, $X$ must not be complete: If $X$ is complete, continuity suffices as Cauchy-sequences are the convergent in $X$. Hence, its the other way round as you asked in your question: Mapping Cauchy-sequences to Cauchy-sequences is the stronger property in comparison to continuity and both agree if $X$ is complete (I think one can prove "iff" here).
Best Answer
If $X$ is complete, and if $Y$ is a metric space and $f : X \rightarrow Y$ is a continuous map, let $(x_n)_{n}$ be a Cauchy sequence in $X$. Then it is convergent. So the sequence $(f(x_n))_{n}$ is also convergent, and so it is Cauchy.
For the other direction, I use an idea from Mindlack's comment.
Let $X$ be a metric space. Let $(x_n)_{n}$ be a Cauchy sequence, and assume it doesn't have a limit. Consider the completion of $X$, denoted by $\overline{X}$, and the canonical isometric embedding $j : X \rightarrow \overline{X}$. Let $x_\infty \in \overline{X}$ be the limit of $(j(x_n))_n$.
Let $g : x \mapsto d_{\overline{X}}(x_\infty,x)$. It is a continuous function, and it is everywhere non-zero, by assumption. So $f := x \mapsto g(x)^{-1}$ is continuous on $X$.
Now, $(f(x_n))_n$ goes to infinity, and is Cauchy by assumption. This is a contradiction. So $(x_n)_n$ is convergent.