[proofplan]
The proof is a direct translation between the $\varepsilon$-$\delta$ definition of continuity at $x_0$ and the language of open balls. In one direction, the usual metric inequality implication sends every point of $B_X(x_0,\delta)$ into $B_Y(f(x_0),\varepsilon)$, which is exactly the image inclusion. In the other direction, the image inclusion applied to a point $x$ with $d_X(x,x_0)<\delta$ gives $d_Y(f(x),f(x_0))<\varepsilon$, recovering the $\varepsilon$-$\delta$ condition.
[/proofplan]
[step:Translate continuity into a pointwise metric implication]
By definition, $f$ is continuous at $x_0$ precisely when for every $\varepsilon>0$ there exists $\delta>0$ such that, for every $x\in X$,
\begin{align*}
d_X(x,x_0)<\delta \implies d_Y(f(x),f(x_0))<\varepsilon.
\end{align*}
For each $\delta>0$, the condition $d_X(x,x_0)<\delta$ is equivalent to $x\in B_X(x_0,\delta)$ by the definition of the open ball in $X$. For each $\varepsilon>0$, the condition $d_Y(f(x),f(x_0))<\varepsilon$ is equivalent to $f(x)\in B_Y(f(x_0),\varepsilon)$ by the definition of the open ball in $Y$.
[/step]
[step:Derive the ball inclusion from continuity]
Assume that $f$ is continuous at $x_0$. Let $\varepsilon>0$ be arbitrary. By continuity at $x_0$, there exists $\delta>0$ such that, for every $x\in X$,
\begin{align*}
d_X(x,x_0)<\delta \implies d_Y(f(x),f(x_0))<\varepsilon.
\end{align*}
We prove
\begin{align*}
f(B_X(x_0,\delta))\subset B_Y(f(x_0),\varepsilon).
\end{align*}
Let $y\in f(B_X(x_0,\delta))$. By definition of image, there exists $x\in B_X(x_0,\delta)$ such that $y=f(x)$. Since $x\in B_X(x_0,\delta)$, the open-ball definition gives $d_X(x,x_0)<\delta$. The chosen $\delta$ therefore gives $d_Y(f(x),f(x_0))<\varepsilon$, hence $f(x)\in B_Y(f(x_0),\varepsilon)$. Since $y=f(x)$, we have $y\in B_Y(f(x_0),\varepsilon)$. Thus the required inclusion holds.
[guided]
Assume that $f$ is continuous at $x_0$. We must show that every target ball around $f(x_0)$ contains the image of some source ball around $x_0$. Fix an arbitrary radius $\varepsilon>0$ in $Y$.
Continuity at $x_0$ gives a radius $\delta>0$ in $X$ such that, for every point $x\in X$,
\begin{align*}
d_X(x,x_0)<\delta \implies d_Y(f(x),f(x_0))<\varepsilon.
\end{align*}
Now we translate this pointwise implication into a set inclusion. To prove
\begin{align*}
f(B_X(x_0,\delta))\subset B_Y(f(x_0),\varepsilon),
\end{align*}
we use the definition of subset: take an arbitrary element $y\in f(B_X(x_0,\delta))$ and prove that $y\in B_Y(f(x_0),\varepsilon)$.
By the definition of the image of a set under the map $f:X\to Y$, the membership $y\in f(B_X(x_0,\delta))$ means that there exists $x\in B_X(x_0,\delta)$ such that $y=f(x)$. Because $x$ lies in the open ball $B_X(x_0,\delta)$, the definition of that ball gives
\begin{align*}
d_X(x,x_0)<\delta.
\end{align*}
The $\delta$ chosen from continuity then implies
\begin{align*}
d_Y(f(x),f(x_0))<\varepsilon.
\end{align*}
By the definition of the open ball in $Y$, this is exactly the statement that
\begin{align*}
f(x)\in B_Y(f(x_0),\varepsilon).
\end{align*}
Since $y=f(x)$, we conclude $y\in B_Y(f(x_0),\varepsilon)$. Because $y$ was arbitrary, the inclusion follows.
[/guided]
[/step]
[step:Recover continuity from the ball inclusion]
Conversely, assume that for every $\varepsilon>0$ there exists $\delta>0$ such that
\begin{align*}
f(B_X(x_0,\delta))\subset B_Y(f(x_0),\varepsilon).
\end{align*}
Let $\varepsilon>0$ be arbitrary, and choose such a $\delta>0$. Let $x\in X$ satisfy $d_X(x,x_0)<\delta$. Then $x\in B_X(x_0,\delta)$, so $f(x)\in f(B_X(x_0,\delta))$. The assumed inclusion gives
\begin{align*}
f(x)\in B_Y(f(x_0),\varepsilon).
\end{align*}
By the definition of the open ball in $Y$,
\begin{align*}
d_Y(f(x),f(x_0))<\varepsilon.
\end{align*}
Thus for every $\varepsilon>0$ there exists $\delta>0$ such that $d_X(x,x_0)<\delta$ implies $d_Y(f(x),f(x_0))<\varepsilon$ for every $x\in X$. Therefore $f$ is continuous at $x_0$.
[/step]