Prove that if a metric space $ (X,d)$ is separable, then its completion ($ \hat{X}, \hat{d}$ ) is separable. So we want to show there exists a countable dense subset in $ \hat{X}$ .

My attempt:

Suppose a metric space $ (X,d)$ is separable.

Then there exists a dense countable subset $ A \subseteq X$ .

Since A is dense in $ X$ , then $ \bar{A}=X$ .

Let $ (\hat{X},\hat{d})$ be the completion of $ (X,d)$ . Then there exists a dense subset $ B\subseteq \hat{X}$ so that $ (X,d)$ is isometric to $ (B,{\hat{d}|}_{AxA})$ .

Thus $ f:X\rightarrow B$ is a bijection and so $ f:\bar{A} \rightarrow B$ is also bijective. Thus $ \bar{A}$ ~$ B$ and $ B$ is countable since $ \bar{A}$ is countable. Thus $ B$ is a dense countable subset of $ \hat{X}$ and hence $ (\hat{X},\hat{d})$ is separable.

Is this the right way of approaching it?