How to prove this result about connectedness? Let $X$ and $Y$ be connected, and let $Y \subseteq X$. If $A$ and $B$ are two non-empty, disjoint open sets (open in the subspace $X-Y$) whose union is $X-Y$, or in other words if $A$ and $B$ form a separation of $X-Y$, then how to prove that $Y \cup A$ and $Y \cup B$ are connected? 
 A: HINT: suppose $C$ and $D$ are open in $X$ and form a separation of $Y \cup A$. Then, since $Y$ is connected, it must lie entirely in one of $C$ or $D$, suppose it is $C$. But then $D \cap A$ and $C \cup B$ form a separation of $X$.
What's left to prove is that this works even when $B$ and $A$ are not open in $X$.
A: Here is a fancier solution. We will use the following:
Lemma:
Let $p: X \rightarrow Y$ be a quotient map. If each fiber $p^{-1}(\{y\})$ is connected, and  $Y$ is connected, then $X$ is also connected.
(this lemma is discussed here : How to prove this result involving the quotient maps and connectedness?)
Collapse the subset $Y \cup A$  of $X$ to a point; call the resulting quotient space $M$. Consider the composition $p: Y \cup B \hookrightarrow X \overset{q}{\rightarrow} M $ (where $q$ is the corresponding quotient map). Now, it remains to show that the conditions of the Lemma above apply to the map $p: Y\cup  B \rightarrow M$:


*

*the image set $M$ is connected (as image of surjective continuous map $q$)

*for every element $y \in M$ the fiber $p^{-1}(\{y\})$ is connected  (each such fiber is either a one-point subset of $B$ or coincides with the connected space $Y$)

*$p$ is a quotient map. (Proof: $p$ is clearly surjective; it is continuous as composition of imbedding and quotient map. Showing that it takes saturated closed subsets $C \subseteq Y \cup B$ to closed sets of $M$ takes a bit more effort and comes down to two cases: 


Case 1: $C \subseteq B$, $C\cap Y=\emptyset$. Then $C$ will also be a closed subset of $X$(because $\overline C \cap (Y \cup B)=C$ and $\overline C \subseteq \overline B$ so that $\overline C \cap A =\emptyset$) and saturated with respect to $q$ so that $p(C)=q(C)$ is closed in $M$. 
Case 2: $Y \cap B \supseteq C\supseteq Y$. Then, $C\cup A$ will be a closed subset of $X$ (because $C\cup A \supseteq A \cup Y$ and $\overline A \cap B=\emptyset$) which is saturated with respect to $q$ so that $p(C)=q(C\cup A)$ is closed in $M$.
A: $A$ and $B$ are opens in $X-Y$, so there are $A^*$ and $B^*$ opens in $X$ that:
$$A = A^* \cap (X-Y) \Rightarrow A^*=A \;\cup\; Y_1 \;\text{that}\; Y_1 \subset Y$$
$$B = B^* \cap (X-Y) \Rightarrow B^*=B \;\cup\; Y_2 \;\text{that}\; Y_2 \subset Y$$
It is obvious from the fact $A \cap B = \emptyset$, so $A^* \cap B =\emptyset$ and $B^* \cap A =\emptyset$.
Assume that $A \cup Y$ is not connected. Thus, there exists $S_1$ and $S_2$ opens in $A \cup Y$ that $S_1 \cap S_2 =\emptyset$. $Y$ is connected, and It is in $S_1 \cup S_2$; as a result, we should have $Y$ in $S_1$ or $S_2$.
$$S_1 = A_1 \cup Y \Rightarrow A_1 \subset A$$
$$S_2 = A_2 \Rightarrow A_2 \subset A$$
We have $S_1$ and $S_2$ are opens in $A \cup Y$, then there exists $S_1 ^*$ and $S_2 ^*$ opens in $X$ that:
$$S_1 = S_1 ^* \cap (A \cup Y)$$
$$S_2 = S_2 ^* \cap (A \cup Y)$$
As we have $S_1 \cap S_2 = \emptyset$, we can write $S_1^*$ and $S_2^*$:
$$S_1^* = S_1 \cup B_1 = A_1 \cup Y \cup B_1 $$
$$S_2^* = S_2 \cup B_2 = A_2  \cup B_2 $$
Thus, we have all the $A_1 \cup Y \cup B_1$, $ A_2 \cup B_2$, $A \cup Y1$, and $B \cup Y2$ are opens in $X$. Moreover, $S_1 \cup S_2 = A \cup Y$. As a result, we have that $ A_1 \cup A_2 = A$.
$$(A_1 \cup Y \cup B_1) \cup (B \cup Y2) =(A_1 \cup Y \cup B) \;\text{open in}\; X $$
$$( A_2 \cup B_2) \cap (A \cup Y1) = (A_2) \;\text{open in}\; X $$
This is a contradiction because $(A_2) \cup (A_1 \cup Y \cup B) = X $, and we have these two sets are disjoints. Additionally, $X$ is connected, and $((A_2) $, $ (A_1 \cup Y \cup B))$ make a separation.
