Consider $(X, \tau)$. Then $X=A \sqcup B$ disconnected and $A,B$ connected implies $A,B \in \tau$ My thought for solving this was to consider $C,D \in \tau$ such that $X = C \sqcup D$ as $X$ is disconnected. Then I thought about trying to prove that either $C=A, D=B$ or $C=B, D=A$. But that would imply that there's only one way to separate $X$, which is not true in general, correct? 

Do you have any advice on how to proceed?
As $X$ is not connected. It's equal to $C\sqcup D$ for some nonempty $C,D\in\tau$. As $A$ and $B$ are connected, $A\subseteq C$ or $A\subseteq D$. Similarly, $B\subseteq C$ or $B\subseteq D$. If both $A$ and $B$, say, lie in $C$, then $D=\emptyset$, contrary to the choice of $D$. Hence $A\subseteq C, B\subseteq D$, or $B\subseteq C, A\subseteq D$. As $A$,$B$ disjoint, $C$,  $D$  disjoint, $A=C,B=D$ or $A=D,B=C$. Thus $A,B\in \tau$.
As $X$ is not connected. It's equal to $C\sqcup D$ for some nonempty $C,D\in\tau$. As $A$ and $B$ are connected, $A\subseteq C$ or $A\subseteq D$. Similarly, $B\subseteq C$ or $B\subseteq D$. If both $A$ and $B$, say, lie in $C$, then $D=\emptyset$, contrary to the choice of $D$. Hence $A\subseteq C, B\subseteq D$, or $B\subseteq C, A\subseteq D$. As $A$,$B$ disjoint, $C$,  $D$  disjoint, $A=C,B=D$ or $A=D,B=C$. Thus $A,B\in \tau$.