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.