Here's a general advice: don't always try to do things by contradiction.
For some reason, students just become enamoured of trying to do everything by contradiction. Perhaps it's the feeling that they get to assume more things. One problem, though, is that you don't really know where you are going with that additional assumption: you are trying to find "a contradiction"... but which? A direct proof has a clear goal, and that has something to recommend it. (In addition, many end up producing a direct proof or a proof by contrapositive, but "disguise" it as a proof by contradiction, which just obfuscates what is going on).
To prove that $\langle H\cup K\rangle$ is the smallest subgroup that contains $H$ and $K$, let $L$ be any subgroup that contains $H$ and $K$. Since $L$ is a subgroup, it is closed under products and inverses, and therefore must contain any expression of the form
$$x_1^{a_1}\cdots x_m^{a_m}$$
with $x_i\in L$ and $a_j\in\{1,-1\}$. In particular, it must contain all such products where $x_i\in H\cup K$, since we are assuming $H\cup K\subseteq L$. That is,
$$\begin{align*}
\langle H\cup K\rangle &=
\left\lbrace a_{i_1}^{k_1}\cdots a_{i_m}^{k_m}\mid m \in \mathbb{N},k_j \in \left\lbrace-1,1\right\rbrace,a_{i_j}\in H\cup K\ \forall j=1,...,m\right\rbrace\\
&\subseteq
\left\lbrace a_{i_1}^{k_1}\cdots a_{i_m}^{k_m}\mid m \in \mathbb{N},k_j \in \left\lbrace-1,1\right\rbrace,a_{i_j}\in L\ \forall j=1,...,m\right\rbrace\\
&\subseteq L.
\end{align*}$$
Thus, $\langle H\cup K\rangle$ is contained in every subgroup that contains $H\cup K$, and therefore is the smallest subgroup that contains $H\cup K$ (since you have already proven that it is a subgroup that contains $H\cup K$).
Having proven that for any set $S$, $\langle S\rangle$ is the smallest subgroup that contains $S$, you should use this property for the second part. This is the property you want to use:
If $X$ is a set, $L$ is a subgroup, and $X\subseteq L$, then $\langle X\rangle \subseteq L$.
Since $R\cup S\subseteq H\cup K\subseteq \langle H\cup K\rangle$, then we know that $\langle R\cup S\rangle \subseteq \langle H\cup K\rangle$ (because $\langle H\cup K\rangle$ is a subgroup that contains $R\cup S$).
Now, $R\subseteq \langle R\cup S\rangle$, so $H=\langle R\rangle\subseteq \langle R\cup S\rangle$; likewise, $S\subseteq \langle R\cup S\rangle$, so $K=\langle S\rangle \subseteq \langle R\cup S\rangle$.
That means that $H\cup K\subseteq \langle R\cup S\rangle$, and therefore that $\langle H\cup K\rangle\subseteq \langle R\cup S\rangle$, proving the other inclusion.
Remark. This is a typical interplay of the "top down" vs the "bottoms up" description of "the blah
generated by X
." I have an extensive discussion about that here. Give it a read.
\langle
and\rangle
for angle brackets, not<
and>
(which are relational symbols) – Arturo Magidin Oct 03 '23 at 15:18