This has been asked over and over again on math.stackexchange and I will ask it again.
Let $L_1/K$ and $L_2/K$ be finite Galois extensions of $K$ inside a common field, then $L_1L_2/K$ is a finite Galois extension.
I'm interested in one common proof of that fact. It goes like this:
$L_1L_2/K$ is finite so it suffices to prove that $L_1L_2$ is the splitting field of a separable polynomial over $K$. $L_i$ is the splitting field of a separable polynomial $f_i$ over $K$. Then $L_1L_2$ is the splitting field for the product of $f_1$ and $f_2$ with common factors only used once.
However, to me it seems that this only works when (the product of) common factors belong to $K[X]$ and I cannot think of a reason why this would be guaranteed (except e.g. when $L_1\cap L_2 = K$).What am I missing, or is this a bogus proof?
Consider, for instance, $L_1 = \Bbb Q(\sqrt2)$ and $L_2 = \Bbb Q(\sqrt3)$ over $K = \Bbb Q$. Then $L_1$ is the splitting field of $f_1(x) = x^2-2$ and $L_2$ is the splitting field of $f_2(x) = x^2-3$. The field $L_1L_2$ is the splitting field of $f_1f_2$ over $K$. Nothing about this construction gives you a polynomial outside of $K[x]$, and it may be applied quite generally, even when $f_1$ and $f_2$ have factors in common.
If it turns out that $f_1$ and $f_2$ have roots in common, then they have a non-1 $\gcd$. But that $\gcd$ is still an element of $K[x]$, as for instance the Euclidean algorithm applies, and doesn't take you out of $K[x]$.
So "the product of $f_1$ and $f_2$ with common factors only used once" is given by $$ \frac{f_1f_2}{\gcd(f_1, f_2)}\in K[x] $$