I'm trying to prove this interesting result. It took me almost $2$ hours to come up with the proof. The main idea is that at least one element of a finite partition of an infinite set is infinite. This is how "total boundedness" comes into the play. Could you have a check on my attempt?
Let $(X, d)$ be a complete and totally bounded metric space. Then $X$ is compact.
My attempt:
Lemma: Sequentially compact metric space is compact. [A proof is provided here]
By our lemma, it's sufficient to prove that $X$ is sequentially compact. Let $(x_m)$ be a sequence in $X$. Because $X$ is totally bounded, for each $n \in \mathbb N^*$, there exists a finite cover $C_n$ of the form $$C_n = \left \{\mathbb B \left (c_{n,k}, n^{-1} \right) \,\middle\vert\, k = 1, \ldots \varphi (n) \right \}.$$
We define an increasing map $\psi:\mathbb N^* \to \mathbb N$ and a decreasing sequence $(I_n)$ recursively as follows. Let $I_0 := \mathbb N$. There exists $\bar k \in \{1, \ldots \varphi (n)\}$ such that the set $$J :=\left \{m \in I_{n-1} \,\middle\vert\, x_m \in \mathbb B \left (c_{n,\bar k}, n^{-1} \right ) \right\}$$ is infinite. Let $\psi(n) := \min J$ and $$I_n := J \setminus \{\psi(n)\} \subsetneq I_{n-1}.$$
Indeed, $(x_{\psi(n)})$ is a Cauchy sequence. Given $\varepsilon >0$, there is $N \in \mathbb N$ such that $1/N < \varepsilon/2$. On the other hand, $x_{\psi(n)} \in I_N$ for all $n > N$. So $$d \left (x_{\psi(n)}, x_{\psi(n')} \right) \le d \left (x_{\psi(n)}, c_{n,\bar k} \right) + d \left (x_{\psi(n')}, c_{n,\bar k} \right) < 2N^{-1}, \quad \forall n,n' > N.$$
Because $X$ is complete, $(x_{\psi(n)})$ is convergent. This completes the proof.