Let
$$A = \left\{e_{2n} −\sqrt{2n + 2} \cdot e_{2n+2} \colon n \in \mathbb N_0\right\}$$ and
$$B = \left\{e_{2n+1} +\sqrt{2n + 2} \cdot e_{2n+3} \colon n \in \mathbb N_0\right\}$$
be subsets of $l^2(\mathbb N_0).$
How to find orthogonal complement of A ∪ B.
I see that intersection of A and B is empty. Does that mean that we are searching for sequences orthogonal in the same time to both of sequences in A and in B?
How could we determine orthonormal basis for this orthogonal complement?
Let us consider example in $\mathbb R^d$ first: For $$ A = \{ e_k - \sqrt{k+1}e_{k+1} \mid 1 \le k \le d-1 \} $$ we have $x\in A^\perp$ if and only if for all $1\le k\le d-1$ $$ 0 = \langle x, e_k - \sqrt{k+1}e_{k+1} \rangle = x_k - \sqrt{k+1} x_{k+1}. $$ That is $$ x_1 = \sqrt{2}x_2 = \sqrt{2\cdot 3}x_3 = \dotsb = \sqrt{d!}x_d. $$
Now, to your original question: Again, $x\in\ell^2(\mathbb N_0)$ is orthogonal to $$ A = \{ e_n - \sqrt{2k+2}e_{n+2} \mid n \ge 0 \} $$ if and only if for all $n\ge 0$ we have $$ 0 = \langle x, e_n - \sqrt{2n+2}e_{2n+n} \rangle = x_n - \sqrt{2n+2} x_{2n+2}. $$ That is $$ x_0 = \sqrt{2}x_2 = \sqrt{2\cdot 4}x_4 = \dotsb = \sqrt{2^nn!} x_{2n+2} = \dotsb $$ And there exists such element in $\ell^2$ with $x_0\ne 0$ (that is $\sum_{n=0}^\infty \frac{1}{2^n n!} < \infty$).
Now, use the same argument on $B$ and you obtain $$ (A\cup B)^\perp = A^\perp \cap B^\perp, $$ which has dimension 2.