For any $x_{0}\in X$ and $r > 0$, then the ball $B(x_{0},r)$ is an open set. The set $\{x\in X\mid d(x,x_{0})\leq r\}$ is a closed set.
Let us prove the first statement first.
Suppose that $x\in B(x_{0},r)$. Thus we have that $s = r - d(x,x_{0}) > 0$. Consequently, the open ball $B(x,s)\subseteq B(x_{0},r)$.
Indeed, one has that \begin{align*} b\in B(x,s) \Rightarrow d(b,x_{0}) & \leq d(b,x) + d(x,x_{0}) < s + d(x,x_{0})\\\\ & = r - d(x,x_{0}) + d(x,x_{0}) = r \Rightarrow b\in B(x_{0},r) \end{align*} whence we conclude that $B(x,s)\subseteq B(x,r)$, and we are done.
We may now tackle the second part.
It suffices to show the set $\{x\in X\mid d(x,x_{0}) > r\}$ is open. Indeed, this is the case.
If we take $b\in\{x\in X\mid d(x,x_{0}) > r\}$, then $s = d(b,x_{0}) - r > 0$.
Consequently, the open ball $B(b,s)\subseteq\{x\in X\mid d(x,x_{0}) > r\}$. In fact, one has that \begin{align*} x\in B(b,s) & \Rightarrow d(x_{0},x) + d(x,b) \geq d(x_{0},b)\\\\ & \Rightarrow d(x,x_{0}) \geq d(x_{0},b) - d(x,b) > d(b,x_{0}) - s = r \end{align*} thence we conclude that $x\in\{x\in X\mid d(x,x_{0}) > r\}$, and we are done.
Could someone please check if I am reasoning correctly?
Yes, you are correct.
The first part is also given in baby Rudin, chapter 2.