Let X be a metrizable space with metric $d$. For disjoint closed sets $A$ and $B$ there is a continuous function $f:X\to[0,1]$ defined by $$f(x)=\frac{d(x,A)}{d(x,A)+d(x,B)}$$ such that $f(A)=\{0\}$ and $f(B) = \{1\}$. Hence by the Urysohn lemma, for each $x_0\in X\setminus A$ where $A$ is a closed set, there exists a continuous function $g:X\to[0,1]$ with $g(x_0) = 1$ and $g(A) = \{0\}$, so that $X$ is completely regular.
Is this correct?
Firstly, in a metrisable space all one-point sets are closed. You don't have to name it as a precondition.
Secondly, if you are already applying Urysohn's lemma, you know that $X$ is normal and normal (plus $T_1$) implying completely regular is trivial, and well-known.
A direct proof of completete regularity: If $x \notin A$ and $A$ is closed, then $f(y)=d(y,x)$ is continuous, maps $x$ to $0$ and all $y \in A$ to a value $\ge d(x,A) > 0$, (positive as $A$ is closed). So rescaling (by dividing by $d(x,A)$, say, and truncating the value to $1$) will give a continuous map to $[0,1]$ that separates $x$ and $A$.
It's a sort of warm up for making Urysohn functions like your $f$.
So your proof as it stands I would not accept, I think.