Is it true that if two open sets in a topological space intersect each other and share the same boundary, they are the same?

Other answers have shown this need not be true in general. However, it is true if you assume $A$ and $B$ are both connected. Indeed, $\partial A\subseteq \partial B$ implies $A\cap B$ is closed as a subset of $B$, and hence must be all of $B$ since it is also open in $B$ and nonempty. Similarly, $A\cap B$ must be all of $A$ as well.


Take the discrete topology on say the natural numbers, and let $A$ and $B$ be distinct sets with non-empty intersection. Their boundaries are empty, so they have the same boundary.


As pointed by Josh Keneda, $A=\{(x,y):x^2+y^2<1\}$ and $B=\mathbb{R}^2\setminus\partial A$ give a counter-example.

You may have a more convoluted conter-example by considering the basins of attraction, in $\mathbb{C}$, for the Newton's map applied to $p(x)=x^3-1$. Assuming that for some $w\in\mathbb{C}$ the iterates $\varphi^{(n)}(w)=\varphi(\varphi^{(n-1)}(w))$ converge, with: $$\varphi(x) = \frac{1}{3x^2}+\frac{2x}{3},$$ they converge to some third root of unity, but $A_1,A_{\omega},A_{\omega^2}$ (with the obvious meaning) share the same boundary:

$\hspace2in$enter image description here

so $A_1\cup A_\omega$ and $A_1\cup A_{\omega^2}$ give another counter-example.