Do $A$ and $B$ have to be open in $X$? If not, how do we know $A$ is open in $Y$?
Do $A$ and $B$ have to be open in $Y$?
Do $A$ and $B$ have to be open in $X$? If not, how do we know $A$ is open in $Y$?
Do $A$ and $B$ have to be open in $Y$?
Copyright © 2021 JogjaFile Inc.

We do not require anything about $A$ and $B$, just that they cover $Y$ and neither contain points from the closure of the other.
The connection to the intrinsic definition of $Y$ is that we may exchange $A$ for $A' = X\setminus \overline B$, the complement of the closure of $B$, and exchange $B$ for $B' = X\setminus \overline A$. Note that $A'$ and $B'$ are no longer disjoint in $X$, but they are disjoint in $Y$, because $A\cap Y = A'\cap Y$ and $B\cap Y = B'\cap Y$. This also shows that $A\cap Y$ and $B\cap Y$ are open in $Y$.
The reason the don't demand anything about openness or closedness in this lemma is probably because 1) By the above paragraph it makes no difference, and 2) It may make it easier in some concrete cases to construct such $A$ and $B$ is we're not required to make them open or closed, only disjoint from one another's closures.