$ X = A \cup B $ where $ A $ and $ B $ are closed and $ A \cap B $ is locally connected. Show that $A$ and $B$ are locally connected. 
Let $(Y, \tau)$ a locally connected topological space. suppose $ Y = A \cup B $ where $ A $ and $ B $ are closed and $ A \cap B $ is locally connected. Show that $A$ and $B$ are locally connected.

let's see that A is locally connected. Let $x \in A$ and $U \subset A$ open, then $U = A \cap W$, where $ W $ is an open of $ X $.
We have two cases if $x \in A \setminus B$ and if $x \in A\cap B$.
If $x \in A \setminus B$. Since $ A \setminus B \subset A $ is open in $X$, let's take the component $C$ of $x$ in $ (A \setminus B) \cap W$, $C$ is connected and is also open for $ X $ is locally connected and $C \subset A \cap W=U$.
If $x \in A \cap B$, I don't know how to prove this case, I would appreciate any help.
 A: Let us prove the following

Theorem. Let $Y$ be locally connected and $C,D$ be closed subspaces such that $C \subset D$, $D \setminus C$ is open in $Y$ and $C$ is locally connected. Then $D$ is locally connected.

Before we give a proof, let us come to corollaries.

Corollary 1. Let $Y$ be locally connected and $A,B$ be closed subspaces such that $A \cup B  = Y$ and $A \cap B$ is locally connected. Then $A$ is locally connected.

This is the contents of your question.
Proof: Set $D = A$ and $C = A \cap B$. Then $D \setminus C =  A \setminus (A \cap B) = A \setminus B = (A \cup B) \setminus B = Y \setminus B$. Hence $D \setminus C$ is open in $Y$.

Corollary 2. Let $Y$ be locally connected and $A \subset Y$ be a subset such that the boundary $\partial A = \overline A \setminus \operatorname{int}(A)$ is locally connected. Then $\overline A$ is locally connected.

Note that this is the contents of Local connectedness in the boundary implies local connectedness in the closure.
Proof. Set $D = \overline A$ and $C = \partial A$.
Proof of Theorem.
Clearly $D$ is locally connected at all points of $D \setminus C$ since this set is an open subset of the locally connected space $Y$.
It remains to show that $D$ is locally connected at all points of $C$.
So let $x \in C$ and let $U_D$ be an open neighborhood of $x$ in $D$. Let $U$ be an open subset of $Y$ such that $U \cap D = U_D$. Then $U_C= U_D \cap C = U \cap C$ is an open neighborhood of $x$ in $C$.
Since $C$ is locally connected, there exists a connected open subset $V_C$ of $C$ such that $x \in V_C \subset  U_C$. Let $V$ be an open subset of $Y$ such that $V \cap C = V_C$. W.l.o.g. we may assume $V \subset U$ (otherwise $V' = V \cap U$ satisfies $V' \subset U$ and $V' \cap C = V \cap U \cap C = V_C \cap U = V_C$ since $V_C\subset U_C \subset U$).
For each $y \in V_C$ let $W_y$ be a connected open subset of $Y$ such that $y \in W_y \subset V$. Define $W = \bigcup_{y\in V_C}W_y$. Since $V_C$ is connected and each $W_y$ has a non-empty intersection with $V_C$, the set $W$ is a connected open subset of $Y$ with $x \in V_C \subset W \subset V$. Note that $W \cap C = V_C$ because $V \cap C = V_C$.
Define $W_D = W \cap D$. This is an open subset of $D$ such that $x \in V_C \subset W_D \subset U_D$. We claim that $W_D$ is connected which will prove that $D$ is locally connected at $x$.
Assume there exist non-empty disjoint open subsets $R, S$ of $W_D$ such that $R \cup S = W_D$. Note that $R,S$ are also closed in $W_D$.  W.l.o.g. $x \in R$. Thus $V_C \cap R \ne \emptyset$. It is impossible that also $V_C \cap S \ne \emptyset$ because $V_C$ is connected. Hence $V_C \subset R$. This implies $S \subset W_D \setminus V_C$.

*

*$S$ is open in $W$ : The set $S$ is open in $W_D$, thus also open in $W_D \setminus V_C = W \cap D \setminus W \cap C = W \cap (D \setminus C)$. Claim 1. follows because $W \cap (D \setminus C)$ is open in $W$.


*$S$ is closed in $W$: The set $S$ is closed in $W_D$ and $W_D = W \cap D$ is closed in $W$.
Thus $S$ is a non-empty clopen subset of $W$ such that $S \ne W$. This is a contradiction because $W$ is connected.
