Let $X$ be a Hausdorff compact space and $A$ and $B$ be two disjoint closed subsets of $X$.
Since $X$ is Hausdorff and compact, it is normal, hence there exists $A_1$ and $B_1$ disjoint neighborhoods of $A$ and $B$. Since $X$ is Hausdorff, $A_1$ and $B_1$ can be chosen s.t. $\overline{A_1}\cap\overline{B_1} =\emptyset.$
In this way we can construct family of neighborhoods $\{ A_n \}$ and $\{ B_n\}$ for $A$ and $B$ with the properties $\overline{A_n} \subseteq A_{n+1},\; \overline{B_n} \subseteq B_{n+1}$ and $\overline{A_n}\cap \overline{B_n}=\emptyset,\; \forall n\in\mathbb{N}.$
My question: Is there a way to construct $\{ A_n \}$ and $\{ B_n\}$ s.t. $X=\bigcup\limits_{n\in\mathbb{N}} A_n \cup \bigcup\limits_{n\in\mathbb{N}} B_n$?
This is not true. Let $X=[0,1], A=\{0\}, B=\{1\}$, $A_n-[0,\frac 1 3 -\frac 1n), B_n=(\frac 2 3-\frac 1 n,1]$. Then $\cup A _n \cup \cup B_n \neq X$.
Answer for the revised verion of the question: This cannot be done if $X$ is connected. If $X=\cup A _n \cup \cup B_n$ then there is a finite subcover for this open cover. In view of monotonicity of the sets this gives $X=A_N \cup B_N$ for some $N$. But this gives a separation of $X$.