HINT $\ $ Specialize the Lemma below to $\rm\ K = \mathbb Q,\ a,b\ =\ 2,3\:. $
LEMMA $\rm\ \ [K(\sqrt{a},\sqrt{b}) : K]\ =\ 4\ $ if $\rm\ \sqrt{a},\ \sqrt{b},\ \sqrt{a\:b}\ $ all are not in $\rm\:K\:$ and $\rm\: 2\: \ne\: 0\:$ in $\rm\:K\:.$
Proof $\ \ $ Let $\rm\ L = K(\sqrt{b})\:.\:$ Then $\rm\: [L:K] = 2\:$ via $\rm\:\sqrt{b} \not\in K\:,\:$ so it is sufficient to prove $\rm\: [L(\sqrt{a}):L] = 2\:.\:$ It fails only if $\rm\:\sqrt{a} \in L = K(\sqrt{b})\ $ and then $\rm\ \sqrt{a}\ =\ r + s\ \sqrt{b}\ $ for $\rm\ r,s\in K\:.\:$ But that is impossible since squaring yields $\rm(1):\ \ a\ =\ r^2 + b\ s^2 + 2\:r\:s\ \sqrt{b}\:,\: $ which contradicts hypotheses as follows:
$\rm\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad rs \ne 0\ \ \Rightarrow\ \ \sqrt{b}\ \in\ K\ \ $ by solving $(1)$ for $\rm\sqrt{b}\:,\:$ using $\rm\:2 \ne 0$
$\rm\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\ s = 0\ \ \Rightarrow\ \ \ \sqrt{a}\ \in\ K\ \ $ via $\rm\ \sqrt{a}\ =\ r \in K$
$\rm\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\quad\ r = 0\ \ \Rightarrow\ \ \sqrt{a\:b}\in K\ \ $ via $\rm\ \sqrt{a}\ =\ s\ \sqrt{b}\:,\: \ $times $\rm\:\sqrt{b}\quad\quad$ QED
REMARK $\ $ By induction, the lemma easily generalizes to algebraic extensions generated by adjoining $\rm\:n\:$ square-roots, see my post here on Besicovic's Theorem, which includes references to generalizations by Mordell and Siegel. These results are elementary special cases of the Galois theory of Kummer extensions.