Show that if $x \in \partial (A \cap B)$ and $x \not\in (A \cap \partial B)\cup (B \cap \partial A)$, then $x \in \partial A \cap \partial B$. This question is for my exam prep. I want to solve the following example:
Show that if $x \in \partial (A \cap B)$ and $x \not\in (A \cap \partial B)\cup (B \cap \partial A)$, then $x \in \partial A \cap \partial B$,
where $A, B \subseteq \mathbb{R^n}$.
 A: Fix a neighbourhood $U$ of $x$. Since $x\in \partial (A\cap B)$, there is some $y\in A\cap B$ which belongs to $U$. In particular, $y\in A$. This shows that $U\cap A\neq\emptyset$. We'll be done if we can argue that $U\setminus A\neq\emptyset$.
Since $x\not \in A\cap \partial B$, we have that either $x\not \in A$ or $x\not\in\partial B$. If $x\not \in A$, then we're done. Suppose thus that $x\not\in \partial B$. That means there is some neighbourhood $V$ of $x$ which is either disjoint from $B$ or disjoint from $B^c$. By replacing $V$ with $U\cap V$, we can assume wlog that $V\subset U$. Again, $x\in\partial (A\cap B)$, so there is some $z\in A\cap B$ with $z\in V$. It follows that $V\cap B^c=\emptyset$. On the other hand, we can use that $x\in\partial (A\cap B)$ to infer the existence of $w\not\in A\cap B$ and $w\in V$. This means that $w\not \in A$ or $w\not\in B$. As $V\cap B^c=\emptyset$, it follows that $w\in B$, so $w\not\in A$. But then $w\in V\setminus A\subset U\setminus A$. In particular, $U\setminus A\neq \emptyset$.
We've shown that $x\in\partial A$. By symmetry, $x\in\partial B$, and we're done.
