Disjoint open sets in a metric subspace corresponds to disjoint open sets in the original metric space.

A classic lemma on metric subspaces (useful in dimension theory, e.g. see van Mill, infinite-dimensional topology, prerequisites and an introduction p. 127):

let $Y$ be a subspace of the metric space $X$ and denote by $\rho Y$ ($\rho X$) the set of closed subsets of $Y$ (resp. $X$) and define $d(x,\emptyset)=+\infty$ for convenience. Then for a closed $A \subseteq Y$ the set $\kappa(A)=\{x \in X: d(x,A) \le d(x,Y \setminus A) \}$ defines a map from $\rho Y \to \rho X$ with the following properties

  1. $\kappa(\emptyset)=\emptyset, \kappa(Y)=X$.
  2. $\kappa(A) \cap Y = A$ for any $A \in \rho Y$.
  3. If $A \subseteq B, A,B \in \rho Y$ then $\kappa A \subseteq \kappa(B)$.
  4. If $A,B \in \rho Y$, $\kappa(A \cup B)=\kappa(A) \cup \kappa(B)$.

The proof isn't hard.

Now, if you have disjoint open $O, O'$ in $Y$. Then $A := Y\setminus O$ is in $\rho Y$, and so is $B:= Y \setminus O'$ and disjointness tells us that $A \cup B = Y$ so $\kappa(A) \cup \kappa(B)=\kappa(Y)=X$ and so it's clear that $U = X\setminus \kappa(A)$ and $U' = X\setminus \kappa(B)$ are the required disjoint "$X$-extensions" for $O$ resp. $O'$.


Suppose $Y$ is a subspace of a metric space $X$, and $U_1,U_2$ are subsets of $Y$ which are open in $Y$. Assuming $U_1$ and $U_2$ are nonempty, the disjoint sets $$V_1=\{x\in X:d(x,U_1)\lt d(x,U_2\}$$ and $$V_2=\{x\in X:d(x,U_2)\lt d(x,U_1\}$$ are open because the functions $x\mapsto d(x,U_1)$ and $x\mapsto d(x,U_2)$ are continuous. Finally, $U_1\subseteq V_1$ because $$x\in U_1\implies d(x,U_1)=0\lt d(x,Y\setminus U_1)\le d(x,U_2)\implies x\in V_1,$$

and similarly $U_2\subseteq V_2$.

That's assuming $U_1$ and $U_2$ are nonempty. Of course, if $U_i=\emptyset$, we can simply take $V_i=\emptyset$ and $V_{3-i}=X$.

P.S. We may as well let $Y=U_1\cup U_2$. That is, all we need to assume is that $U_1$ and $U_2$ are disjoint sets which are open in $U_1\cup U_2$, which is another way of saying that $U_1$ and $U_2$ are separated sets, disjoint sets such that neither contains a limit point of the other. We have shown that in a metric space, any two separated sets (for example, disjoint closed sets) are contained in disjoint open sets.