Let $(X,d)$ and $(Y,d)$ be metric spaces and $(X,d)$ is compact. Further let $f : X \rightarrow Y$ be a continuous map.
Prop: Image of $f(X)$ is compact under $f$.
Pf: We wish to show that $f(X)$ is totally bounded and complete. Since $X$ is totally bounded,$\forall r>0, \exists x_1,...,x_n \in X : X \subseteq \bigcup^n_{i=1}B_r(x_i)$. As $f$ is uniformly continuous, $\forall \epsilon>0, \exists \delta >0 : d(x,y)<\delta \implies d(f(x),f(y))<\epsilon$. Using the fact that $f(\bigcup^n_{i=1}B_{\delta}(x_i)) \subseteq \bigcup^n_{i=1}B_{\epsilon}(f(x_i))$, $f[X] \subseteq \bigcup^n_{i=1}B_{\epsilon}(f(x_i))$. Thus, $f[X]$ is totally bounded. If $\{x_n\}$ is Cauchy sequence in $f(X)$, $\exists N \in \mathbb{N} : \forall m,n \geq N \implies d(x_n,x_m)<\epsilon$. By continuity, $\forall \epsilon >0, \exists \delta >0 : d(x_n,x_m)<\delta \implies d(f(x_n),f(x_m))<\epsilon$. Then, $\{f(x_n)\}$ is a Cauchy sequence in $X$. As $\{x_n\} \rightarrow x$ for some $x \in X$, $\{f(x_n)\} \rightarrow f(x)$. Thus, $f(X)$ is complete.
It's easier to use the direct, simple definition of compactness, instead of its characterisation in metric (or uniform) spaces:
Suppose $\mathcal{U}$ is an open cover of $f[X]$ (with open sets of $Y$, WLOG). Then by continuity and basic set theory, $\mathcal{U}'= \{f^{-1}[O]: O \in \mathcal{U}\}$ is an open cover of $X$ and so has a finite subcover $f^{-1}[O_1], \ldots, f^{-1}[O_n]$. But then $\{O_1, \ldots, O_n\}$ is a finite subcover of $\mathcal{U}$. QED
If you look at your attempted proof, you're really using uniform continuity of $f$. In fact, you can reduce the proof to four separate propositions:
If $f(X,d) \to (Y,d')$ is uniformly continuous and $X$ is totally bounded then so is $f[X]$.
If $f(X,d) \to (Y,d')$ is uniformly continuous and $X$ is complete then so is $f[X]$.
If $(X,d)$ is compact and $f: (X,d) \to (Y,d')$ is continuous, then $f$ is uniformly continuous.
$(X,d)$ is compact iff it is totally bounded and complete.
Combining these also gives the theorem. But the 4 facts are also of independent interest.