Dedekind's Product Theorem, which proves that $[M:K] = [M:L][L:K]$ for any tower of extensions $K\subseteq L\subseteq M$, is proven by showing that if $\{\ell_i\}_{i\in I}$ is a basis for $L$ over $K$, and $\{m_j\}_{j\in J}$ is a basis for $M$ over $L$, then $\{m_j\ell_i\}_{(i,j)\in I\times J}$ a basis for $M$ over $K$.
You know that $\mathbb{Q}\subseteq \mathbb{Q}(\sqrt{2})\subseteq \mathbb{Q}(\sqrt{2})(\sqrt{3})$. You've shown that $\{1,\sqrt{3}\}$ is a basis for $\mathbb{Q}(\sqrt{2})(\sqrt{3})$ over $\mathbb{Q}(\sqrt{2})$ (since the extension is of degree $2$), and you know that $\{1,\sqrt{2}\}$ is a basis for $\mathbb{Q}(\sqrt{2})$ over $\mathbb{Q}$. You have all the ingredients you need.
Note: You write: "a basis for $\mathbb{Q}(\sqrt{2})$ is $a+b\sqrt{2}$". This is incorrect as written: a general element of $\mathbb{Q}(\sqrt{2})$ is of the form $a+b\sqrt{2}$ with $a,b\in\mathbb{Q}$, but neither a single element, nor all these elements, form a basis for $\mathbb{Q}(\sqrt{2})$ over $\mathbb{Q}$.