As total boundedness is usually used as a stepping stone towards showing a sequentially compact metric space is compact, I do not think assuming compactness of $X$ is what is intended for this problem.
The contrapositive is easily proved:
Suppose $X$ is not totally bounded. Then there is an $\epsilon>0$ so that no finite collection of open balls covers $X$. So, for any finite collection of points $\{x_1,\ldots ,x_n\}$, there is a point $x$ in $X$ not in any of open balls $B_\epsilon(x_k)$, $k=1,\ldots n$; whence, $d(x,x_k)>\epsilon$ for each admissible $k$.
Using the above observation, one may construct, by induction, a sequence $(y_n)$ in $X$ such that $d(y_i,y_j)>\epsilon$ whenever $i\ne j$.
I'll leave the rest of the argument for you...