I tried to do it in a way different from my textbook:
Let $(X,d)$ be a compact metric space then it is totally bounded.(I have been Ble to prove this).
My doubt lies in the following part that I have tried to prove:
Let $X$ be a compact metric space then $X$ is totally bounded.We choose a cauchy sequence $\{x_n\}$ in $(X,d)$ .
Let $A$ be a subset of $(X,d)$ such that $A=\{x_n\}$.Then $A$ will be totally bounded too as $A \subset (X,d)$.
Let for an $\epsilon > 0$ there exist points $\{x_1',\cdots x_n'\}$ such that $B_d(x_k',\epsilon)$ contains infinitely many points of $A$.Then as $\{x_n\}$ is a cauchy sequence so we can conlcude that $\{x_n\}$ converges to $x_k'$. Also as $(X,d)$ is a metric space so $\{x_n\}$ can converge to only one points and we have shown that $x_k'$ is a limit point of $\{x_n\}$.