I want to know whether my proof is correct.
Let $\varepsilon>0$. Since $[0,1] \cap \mathbb{Q}$ is dense in $[0,1]$, then for any $x\in [0,1]$, there exists an open neighbourhood $U_x =\{y: |x-y|<\varepsilon$ of $x$ so that $U_x \cap \mathbb{Q} \neq \emptyset$. Further, the collection $\{U_x: x \in [0,1]\}$ is an open cover of $[0,1]$. Since $[0,1]$ is compact, there is finite subset $D$ of $[0,1]$ such that $[0,1] \subseteq \bigcup_{x\in D} U_{x}$. So, we have $[0,1] \cap\mathbb{Q}\subseteq \bigcup_{x\in D} U_{x}$. Therefore, we deduce that $[0,1] \cap \mathbb{Q}$ is totally bounded.
Note: a metric space $(X,d)$ is called totally bounded if for any $\varepsilon > 0$, there is a finite set $A\subseteq X$ such that $X=\bigcup_{x\in A}B_d(x, \varepsilon)$.
No you have several errors. First
doesn't really make sense. What density implies is that for all $x\in [0,1]$ and $\epsilon>0$ $B_d(x,\epsilon)\cap \left(\mathbb{Q}\cap [0,1]\right) \not= \not0$. You should use that to show that $$ [0,1]\subset \bigcup_{x\in [0,1]\cap\mathbb{Q}} B_d(x,\epsilon). $$ And then use that $[0,1]$ is compact as you did and make the conclusion.