[guided]The only subtle point is the possible convention about where the centers of a finite cover must lie. Some definitions of a totally bounded subset of $M$ allow the covering balls to have centers anywhere in $M$, while others require the centers to lie in the subset itself. We prove the stronger version with centers in $A$.
Fix $\varepsilon > 0$ and set $\rho := \varepsilon/2$. The reason for using $\varepsilon/2$ instead of $\varepsilon$ is that we will move the center of each relevant ball from a point $x_i \in M$ to a nearby point $a_i \in A$. The triangle inequality will then double the radius.
Since $M$ is totally bounded, there are finitely many points $x_1,\dots,x_N \in M$ such that
\begin{align*}
M \subset \bigcup_{i=1}^{N} B_M(x_i,\rho).
\end{align*}
Not every ball in this cover has to meet $A$, so we keep only the relevant indices. Define
\begin{align*}
I := \{i \in \{1,\dots,N\} : A \cap B_M(x_i,\rho) \neq \varnothing\}.
\end{align*}
For each $i \in I$, the set $A \cap B_M(x_i,\rho)$ is nonempty by definition of $I$, so we may choose a point $a_i \in A \cap B_M(x_i,\rho)$. The set $I$ is finite because $I \subset \{1,\dots,N\}$.
We now verify that the balls centered at these selected points cover $A$. Let $a \in A$. Since $a \in M$ and the balls $B_M(x_i,\rho)$ cover $M$, there is an index $i \in \{1,\dots,N\}$ with $a \in B_M(x_i,\rho)$. This also shows that $A \cap B_M(x_i,\rho)$ is nonempty, because it contains $a$. Hence $i \in I$, so the point $a_i \in A \cap B_M(x_i,\rho)$ has been chosen.
Now both $a$ and $a_i$ lie within distance $\rho$ of $x_i$. Applying the triangle inequality in the [metric space](/page/Metric%20Space) $(M,d)$ gives
\begin{align*}
d(a,a_i) \leq d(a,x_i) + d(x_i,a_i) < \rho + \rho = \varepsilon.
\end{align*}
Therefore $a \in B_M(a_i,\varepsilon)$. Since $a \in A$ was arbitrary, the finite family $\{B_M(a_i,\varepsilon) : i \in I\}$ covers all of $A$.[/guided]