Artificial intelligent assistant

Proof of equivalency in disjoint sets. Prove, If A, B, C, and D are sets with |A|=|B| and |C|=|D| and if A and C are disjoint and B and D are disjoint, then |A ∪ C|= |B ∪ D|. Would I start this proof using the definition of disjoint sets with A and C? Also would this turn into a proof by contradiction?

We want to show that $|A\cup C|=|B\cup D|$. Since $|A|=|B|$ and $|C|=|D|$, there are bijections $g:A\to B$ and $h:C\to D$.

Define $f:A\cup C\to B\cup D$ as follows:

$$ f(x)= \begin{cases} g(x)&\text{if}&x\in A\\\ h(x)&\text{if}&x\in C \end{cases}. $$

Then, $f$ is a bijection since $A\cap C=B\cap D=\emptyset$.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy cc42b5d7ac85ffe5642a432f91820dcd