[step:Construct the completion from Cauchy sequences]
Let $\mathcal C(X)$ denote the set of all Cauchy sequences in $X$. Define a relation $\sim$ on $\mathcal C(X)$ by declaring that two Cauchy sequences $(x_n)_{n=1}^\infty$ and $(y_n)_{n=1}^\infty$ satisfy $(x_n)\sim (y_n)$ if
\begin{align*}
\lim_{n\to\infty} d_X(x_n,y_n)=0.
\end{align*}
This is an equivalence relation. Reflexivity follows from $d_X(x_n,x_n)=0$. Symmetry follows from symmetry of $d_X$. For transitivity, if $(x_n)\sim(y_n)$ and $(y_n)\sim(z_n)$, then the triangle inequality gives
\begin{align*}
d_X(x_n,z_n)\le d_X(x_n,y_n)+d_X(y_n,z_n),
\end{align*}
so $d_X(x_n,z_n)\to 0$.
Define
\begin{align*}
\widehat X:=\mathcal C(X)/{\sim}.
\end{align*}
For a Cauchy sequence $(x_n)_{n=1}^\infty$, write $[(x_n)]$ for its equivalence class.
For $\xi=[(x_n)]\in \widehat X$ and $\eta=[(y_n)]\in \widehat X$, define
\begin{align*}
\widehat d(\xi,\eta):=\lim_{n\to\infty} d_X(x_n,y_n).
\end{align*}
This limit exists because, for $m,n\in\mathbb N$, the [reverse triangle inequality](/theorems/2300) gives
\begin{align*}
\left|d_X(x_n,y_n)-d_X(x_m,y_m)\right|
\le d_X(x_n,x_m)+d_X(y_n,y_m),
\end{align*}
and the right-hand side tends to $0$ as $m,n\to\infty$. Hence $(d_X(x_n,y_n))_{n=1}^\infty$ is a Cauchy sequence in $\mathbb R$ and therefore converges.
The value of $\widehat d(\xi,\eta)$ is independent of the representatives. Indeed, if $(x_n)\sim(x_n')$ and $(y_n)\sim(y_n')$, then
\begin{align*}
\left|d_X(x_n,y_n)-d_X(x_n',y_n')\right|
\le d_X(x_n,x_n')+d_X(y_n,y_n'),
\end{align*}
and the right-hand side tends to $0$.
The function $\widehat d:\widehat X\times \widehat X\to [0,\infty)$ is a metric. Non-negativity and symmetry follow from the corresponding properties of $d_X$. Also,
\begin{align*}
\widehat d([(x_n)],[(y_n)])=0
\end{align*}
holds if and only if $(x_n)\sim(y_n)$, which is exactly equality of equivalence classes. Finally, for $\xi=[(x_n)]$, $\eta=[(y_n)]$, and $\zeta=[(z_n)]$, the triangle inequality in $X$ gives
\begin{align*}
d_X(x_n,z_n)\le d_X(x_n,y_n)+d_X(y_n,z_n).
\end{align*}
Taking limits gives
\begin{align*}
\widehat d(\xi,\zeta)\le \widehat d(\xi,\eta)+\widehat d(\eta,\zeta).
\end{align*}
[/step]