Solution (source code)

= Solution

Given $N\trianglelefteq G$ and $H\le G$, the conditions are $\boxed{G=NH,\quad N\cap H=\{1\}}$. Every element then has a unique expression $nh$. The extra datum is the action $\alpha:H\to\operatorname{Aut}(N)$ given by <conjugation>, $\alpha_h(n)=hnh^{-1}$. On pairs $(n,h)$ the reconstructed multiplication is
$$
(n,h)(n',h')=(n\alpha_h(n'),hh').
$$
For example $S_3=\langle(123)\rangle\rtimes\langle(12)\rangle$. The order-three <subgroup> is normal, the intersection is trivial, and their sizes multiply to six. <Conjugation> by $(12)$ inverts $(123)$, so the action is nontrivial. Consequently this is not the direct product of these <subgroups>: $C_3\times C_2$ is <Abelian>, whereas $S_3$ is not.