This is Exercise I.11.4 of Bourbaki's General Topology.
Let $X$ be a connected space.
a) Let $A$ be a connected subset of $X$, $B$ a subset of $\complement A$ which is both open and closed in $\complement A$. Show that $A\cup B$ is connected.
b) Let $A$ be a connected subset of $X$ and $B$ a component of the set $\complement A$. Show that $\complement B$ is connected (use a)).
I have managed to show a).
My attempts to show b): Let $C$ be a nonempty clopen subset of $\complement B$. By a), $B\cup C$ is connected. Since $B$ is a component of $\complement A$, $B\cup C$ cannot be a subset of $\complement A$. So $C$ has to contain an element of $A$. Since $A$ is connected, $A\subset C$. But I'm stuck here. I can't see how this implies $C=\complement B$.
Can someone point me in the right direction?