Let $L,M$ be the splitting field of $f,g$ over $K$. Then the compositum $LM$ is the splitting field of $fg$. Now your question translates with the help of the main theorem of galois theory into the following group question:
How can one compute $G$ if one knows normal subgroups $N_1, N_2$, the quotients $G/N_i$ and the fact that $G=N_1 N_2$. This seems pretty hard to me in general.

Well, to be precise, it *is* pretty hard, because it includes the general extension problem: Determine $G$ just knowing $N$ and $G/N$. So it's sure to say that your galois group is certainly not uniquely determined by the given information.