Let $Y \subset X$; let $X$ and $Y$ be connected. Show that if $A$ and $B$ form a separation of $X \setminus Y$, then $Y \cup A$ is connected. I am trying  to solve

Let $Y \subset X$; let $X$ and $Y$ be connected. Show that if $A$ and $B$ form a separation of $X \setminus Y$, then $Y \cup A$ is connected.

My ATTEMPT:
We will show that $Y \cup A$ is connected. Let it is not, then there is a separation $(U, V)$ on $Y \cup A$. Since $Y$ is a connected subspace of $Y \cup A$, either $Y \subset U$ or $Y \subset V$. Suppose $Y \subset U$, then $V \subset A$. Therefore, $X = (B \cup U)   \cup V $. Since $(U,V)$ is a separation of $Y \cup A$, then no limit points of $U$ is in $V$ and vice versa. Similarly, no limit points of $B$ is in $V$, because  $V \subset A$ and $(A,B)$ form a separation of $X-Y$.  Therefore, $(B \cup U)^\prime \cap V^\prime = (B^\prime \cup U ^\prime) \cap V^\prime =  (B^\prime  \cap V^ \prime) \cup (U^\prime \cap V^\prime) = \emptyset \cup \emptyset = \emptyset$, hence no limit points of $B \cup U$ is in $V$ and vice versa.
Is my attempt correct?  But I can not proceed further?
$\color{red}{\text{Actually, I want to prove $B \cup U$ closed in $X$ and $V$ is open in $X$.}}$ If I can prove it then $(B \cup U, V)$ is a separation on $X$, hence a contradiction.
Please help me.
 A: For a topological space X, connectedness has a number of equivalent definitions.

*

*X can't be written as disjoint union of two open subsets U,V or two closed subsets E,F.

*X has no non-trivial subsets that are simultaneously open and closed.

*X can't be written as the union of two non-empty sets A,B such that $A\cap B'=\phi=A'\cap B$.

The third definition does not take A,B to be open or closed. The argument you've provided is enough to arrive at a contradiction.
A: First a definition:
Definition: Let $X$  a topological space and $A, B\subset X$. We say that $A$ and $B$ are mutually separated in $X$ if $\overline{A} \cap B=\emptyset$ and $A \cap \overline{B}=\emptyset$.
The theorem with the definition
Let $Y\subset X$; let $X$ and $Y$ be connected. Show that if $A$ and $B$ form a separation of $X-Y$ (i.e. $A, B\subset X$ not empty mutually separated such that $A\cup B=X-Y$) then Y∪A is connected.
Proof
Suppose $Y\cup A$ is not connected. Then there are $X_1, X_2\subset X$ not empty mutually separated such that $Y\cup A=X_1 \cup X_2$. Note that $X=(Y\cup A)\cup B=(X_1 \cup X_2)\cup B$, as $Y$ is connected and $Y\subset Y\cup A=X_1 \cup X_2$ we have $Y\subset X_1$ and $X_2 \subset A$.
Let´s show that $\overline{(X_1 \cup B)} \cap X_2 = \emptyset = (X_1\cup B)\cap \overline{X_2}$.
Note that $\overline{(X_1 \cup B)} \cap X_2 = (\overline{X_1}\cup \overline{B})\cap X_2 = (\overline{X_1}\cap X_2)\cup (\overline{B}\cap X_2)= \emptyset$. Because $X_1$ and $X_2$ are mutually separated and we have $\overline{X_1}\cap X_2=\emptyset$. Also  $\overline{B}\cap X_2=\emptyset$ because $X_2 \subset A$ and $A\cap \overline{B}=\emptyset$
Finally note that $(X_1\cup B)\cap \overline{X_2} = (X_1 \cap \overline{X_2})\cup (B\cap \overline{X_2})=\emptyset$
Then we have shown $X$ is not connected, which is a contradiction
