Problem: Let $(X,d)$ be a metric space and let $\{x_n\}_{n=1}^\infty$ a Cauchy sequence in $X$. Prove that if $\{x_n\}_{n=1}^\infty$ admits a convergent subsequence, then $\{x_n\}_{n=1}^\infty$ converges.
I am new to analysis, and am very much confused of the above problem because of the if part of the problem statement. Here is my attempt for the solution:
Since $\{x_n\}_{n=1}^\infty$ is Cauchy, for every $\epsilon > 0$, there exists a natural number $N$ such that for every $n,m \geq N$, $d(x_n, x_m) < \epsilon$. Since $\{x_n\}_{n=1}^\infty$ is a sequence in $X$, $x_k \in X$ for any $k$. Now, a sequence in $X$ is convergent if there exists $a \in X$ such that for every $\epsilon > 0$, there exists a natural number $N$ such that for every $n \geq N$, $d(x_n, a) < \epsilon$. Hence, combining the two definitions, there exists $N$ such that, if we fix $m \geq N$, then for any $n \geq N$, $x_n$ converges to $a = x_m \in X$.
So I didn't use the if part of the problem. It'd be great if anyone could point out what am I missing here, as well as how this if part of the statement is used to solve the problem statement.