[proofplan]
We prove the inclusion directly from the closure definition and the triangle inequality. If $x$ lies in the closure of the open ball, then every small ball around $x$ meets $B(x_0,r)$, so we can choose points $y$ with $d(y,x_0)<r$ and $d(x,y)$ arbitrarily small. The triangle inequality then gives $d(x,x_0)\le r$. To show the inclusion can be proper, we use the two-point discrete metric, where a point at exact distance $r$ from the center lies in the closed ball but is isolated from the open ball.
[/proofplan]
[step:Approximate a closure point by points inside the open ball]
Let $x \in \overline{B(x_0,r)}$. By the definition of closure in a [metric space](/page/Metric%20Space), for every $\varepsilon>0$ there exists a point $y_\varepsilon \in X$ such that
\begin{align*}
y_\varepsilon \in B(x_0,r) \cap B(x,\varepsilon).
\end{align*}
Thus
\begin{align*}
d(y_\varepsilon,x_0)<r
\end{align*}
and
\begin{align*}
d(x,y_\varepsilon)<\varepsilon.
\end{align*}
[guided]
Let $x \in \overline{B(x_0,r)}$. The notation $\overline{B(x_0,r)}$ means the closure of the open ball $B(x_0,r)$ in the metric space $X$; it is not the same notation as the closed ball $\overline{B}(x_0,r)$, which we are trying to reach.
By the definition of closure in a metric space, every open ball centered at $x$ must meet the set whose closure contains $x$. Therefore, for each $\varepsilon>0$, the open ball $B(x,\varepsilon)$ intersects $B(x_0,r)$. Hence there exists a point $y_\varepsilon \in X$ such that
\begin{align*}
y_\varepsilon \in B(x_0,r) \cap B(x,\varepsilon).
\end{align*}
Unpacking the two ball conditions gives
\begin{align*}
d(y_\varepsilon,x_0)<r
\end{align*}
and
\begin{align*}
d(x,y_\varepsilon)<\varepsilon.
\end{align*}
This point $y_\varepsilon$ is the approximation to $x$ from inside the open ball. The parameter $\varepsilon$ is arbitrary, so these approximations can be made as close to $x$ as needed.
[/guided]
[/step]
[step:Use the triangle inequality to place the closure point in the closed ball]
For every $\varepsilon>0$, the triangle inequality applied to the three points $x,y_\varepsilon,x_0 \in X$ gives
\begin{align*}
d(x,x_0)\le d(x,y_\varepsilon)+d(y_\varepsilon,x_0)<\varepsilon+r.
\end{align*}
Since this holds for every $\varepsilon>0$, we must have $d(x,x_0)\le r$. Indeed, if $d(x,x_0)>r$, then choosing $\varepsilon=(d(x,x_0)-r)/2>0$ would contradict $d(x,x_0)<r+\varepsilon$. Therefore $x \in \overline{B}(x_0,r)$.
Since $x \in \overline{B(x_0,r)}$ was arbitrary, we conclude
\begin{align*}
\overline{B(x_0,r)} \subset \overline{B}(x_0,r).
\end{align*}
[/step]
[step:Exhibit a metric space where the inclusion is proper]
Let $X=\{a,b\}$, define the metric $d:X\times X\to [0,\infty)$ by setting $d(u,v)=0$ when $u=v$ and $d(u,v)=1$ when $u\ne v$, and take $x_0=a$ and $r=1$.
Then
\begin{align*}
B(a,1)=\{a\}.
\end{align*}
The point $b$ is not in the closure of $\{a\}$, because
\begin{align*}
B(b,1/2)=\{b\}
\end{align*}
and hence $B(b,1/2)\cap \{a\}=\varnothing$. Thus
\begin{align*}
\overline{B(a,1)}=\{a\}.
\end{align*}
On the other hand, since $d(a,a)=0\le 1$ and $d(b,a)=1\le 1$, the closed ball is
\begin{align*}
\overline{B}(a,1)=X=\{a,b\}.
\end{align*}
Therefore
\begin{align*}
\overline{B(a,1)}=\{a\}\subsetneq \{a,b\}=\overline{B}(a,1).
\end{align*}
This proves that the inclusion can be proper.
[/step]