The core of your question has not much to do with topology - it is a question about sets. Before you can define a topology on $X \coprod Y$, you have to understand what this object is on the level of sets. Already on that level you can ask (without any reference to topology)
If $A \subset X$ and $B \subset Y$, is it true that $A \coprod B \subset X \coprod Y$?
There are two ways to introduce a new mathematical object:
Direct constructive approach: Simply give an explicit construction of the object.
Conceptual approach: Specify a characteristic property determining the desired object up to unique isomorphism and then prove existence via giving an explicit construction.
In my opinion the conceptual approach should be preferred because it explains the purpose of what is introduced. This approach is of course more abstract - and it also requires to construct the new object.
I think you know that the concept of disjoint union of sets can be introduced as follows:
Given two sets $X,Y$, we say that a triple $(X \coprod Y, i_X, i_Y)$ consisting of a set $X \coprod Y$ and functions $i_X : X \to X \coprod Y, i_Y : Y \to X \coprod Y$ has the disjoint union property if for each pair of functions $f_X : X \to Z, f_Y :Y \to Z$ having the same codomain $Z$ there exists a unique function $f : X \coprod Y \to Z$ such that $f \circ i_X = f_X, f \circ i_Y = f_Y$.
It is easy to verify that all triples having the disjoint union property are isomorphic via a unique "structure preserving" isomorphism. Moreover, the functions $i_X, i_Y$ must necessarily be injective and we have $i_X(X) \cup i_Y(Y) = X \coprod Y, i_X(X) \cap i_Y(Y) = \emptyset$. Therefore they embed $X, Y$ as disjoint subsets into $X \coprod Y$, and frequently authors regard $X,Y$ as genuine subsets of $X \coprod Y$ although this in general not literally true.
It remains to construct a triple with the disjoint union property. A standard approach is to define
$$X \coprod Y = X \times \{1\} \cup Y \times \{2\},$$
$$i_X(x) = (x,1), i_Y(y) = (y,2).$$
With this definition the answer to your question is "yes".
Note that if $X \cap Y = \emptyset$ we can also take $X \coprod Y = X \cup Y$; then $i_X, i_Y$ are the genuine inclusions. Then the answer is again "yes". However, we could use a more exotic definition like
$$X \coprod Y = X \times \{(X,1)\} \cup Y \times \{(Y,2)\}$$
with the obvious $i_X, i_Y$. In that case the answer is "no".
You see that the answer to your question depends on the specific construction of disjoint unions. You can do it such that you get genuine inclusions $A \coprod B \subset X \coprod Y$, and this is a particlar nice feature, but can also do it in another way.
In my opinion the property $A \coprod B \subset X \coprod Y$ is not that important. It suffices to know that $A \coprod B$ embeds canonically into $X \coprod Y$, and that is all we need.
Remark:
There are many similar cases, for example the Cartesian product of sets. It also depends on the specific construction whether we have $A \times B \subset X \times Y$.
Update concerning the canonical embedding of $A \coprod B$ into $X \coprod Y$:
Given functions $u : X \to X', v : Y \to Y'$, consider $f'_X = i_{X'} \circ u : X \to X' \coprod Y', f'_Y = i_{Y'} \circ v : Y \to X' \coprod Y'$. By the universal property we get a unique function $u \coprod v : X \coprod Y \to X' \coprod Y'$ such that $(u \coprod v) \circ i_X = f'_X = i_{X'} \circ u, (u \coprod v) \circ i_Y = f'_Y = i_{Y'} \circ v$.
Apply this to the inclusions $j_A : A \hookrightarrow X, j_B : B \hookrightarrow Y$.