The boundary is a closed set

Solution 1:

The boundary of a set $A$ is defined as $\overline{A} \cap \overline{X - A}$. It is the intersection of two closed sets and hence is closed.

By the way your proof is not correct because you assumed that $A$ is either open or closed. There are sets like $(0,1] \subset \Bbb{R}$ in the usual topology that are neither open nor closed.

Solution 2:

Your very first statement simply isn’t true: there need not be any non-empty open set contained in the boundary of $A$. Suppose that $A=[0,1]$ in the space $\Bbb R$: the boundary of $A$ is the set $\{0,1\}$, which does not contain any non-empty open subset of $\Bbb R$.

I suggest that you try to show that $X\setminus\operatorname{bdry}A$ is open, from which it will follow at once that $\operatorname{bdry}A$ is closed. To do this, pick a point $x\in X\setminus\operatorname{bdry}A$, and show that some open neighborhood of $x$ is disjoint from $\operatorname{bdry}A$. You’ll need to consider two cases: if $x\in X\setminus\operatorname{bdry}A$, either $x$ has an open neighborhood disjoint from $A$, or $x$ has an open neighborhood disjoint from $X\setminus A$.