Since $X$ and $Y$ are countable, we have two bijections:
(1) $f: \mathbb{N} \rightarrow X$ ;
(2) $g: \mathbb{N} \rightarrow Y$.
So to prove that $X\cup Y$ is countable, I figure I need to define some function,
h: $\mathbb{N} \rightarrow X\cup Y$
Thus, I was wondering if I could claim something similar to the following:
since we have (1) & (2) it follows that we also have the bijections
$\alpha : \{n\in \mathbb{N} : n = 2k + 1, k\in \mathbb{N}\} \rightarrow X$;
$\beta : \{n\in \mathbb{N} : n = 2k, k\in \mathbb{N}\} \rightarrow Y$;
because we have bijections from $\mathbb{N}$ to the evens and odds respectively.
Then define $h := \alpha$ for odd $n$, $h := \beta$ for even $n$.
Thus, since $\forall n\in \mathbb{N}$(either $n$ is even or $n$ is odd but not both) $h$ is a bijection from $\mathbb{N}$ to $X\cup Y$.
Thanks for reading, and for answering if you answer. I'm just really unsure if my logic holds here, or if I'm even approaching this right because I've been stuck on this problem for a little while today.
p.s sorry for asking so many questions recently, I'm trying to study on my own and apparently I get confused and stuck more easily than I thought I would without a teacher.
EDIT: (1) fixed the even and odd. (2) I do mean countably infinite. My bad, going through some notes I found online they were using the notation of "countable" for what you call "countably infinite", and "at most countable" for what you called "countable" (3) Thanks for the good answers, I do see now that this makes breaks down when they are not disjoint, but at least I'm not too far off.