I'm studying Intro to Topology by Mendelson.
The problem statement is,
Let $A,B\subset X$, $X$ a topological space. If $A$ is connected, $B$ open and closed, and $A\cap B\neq\emptyset$ then $A\subset B$.
My proof is,
By way of contradiction, suppose that $A$ is not a subset of $B$. Then there exists an $a\in A$ such that $a\in C(B)$. Consider the sets $P=A\cap B$ and $Q=A\cap C(B)$. Note that both $P$ and $Q$ are nonempty and open. Thus, we have that $A\subset A\cap B\cup A\cap C(B)$ and $P\cap Q=A\cap B\cap C(B)=A\cap\emptyset=\emptyset\subset C(A)$. Also, $P\cap A\neq\emptyset$ and $Q\cap A\neq\emptyset$. Therefore, $A$ is disconnected, which is a contradiction, since $A$ is assumed connected.
I'm not sure if this was even the right approach, but it's my best shot so far.
Thanks for any hints or feedback!