For $N\unlhd G$ for $\mathfrak{B}$-group $G$ with $G/N$ a free $\mathfrak{B}$-group, show $\exists H\le G$ with $G=HN$ and $H\cap N=1$ This is Exercise 2.3.5 of Robinson's "A Course in the Theory of Groups (Second Edition)". In the book, maps are evaluated from left to right. According to Approach0, the exercise is new to MSE.
The Details:
Since definitions vary, on page 15, ibid., paraphrased, it states that

A subgroup $N$ of $G$ is normal in $G$ if one of the following equivalent statements is satisfied:
(i) $xN=Nx$ for all $x\in G$.
(ii) $x^{-1}Nx=N$ for all $x\in G$.
(iii) $x^{-1}nx\in N$ for all $x\in G, n\in N$.

On page 56, ibid.,

Let $F$ be a free group on a countably infinite set $\{x_1,x_2,\dots\}$ and let $W$ be a nonempty subset of $F$. If $w=x_{i_1}^{l_1}\dots x_{i_r}^{l_r}\in W$ and $g_1,\dots, g_r$ are elements of a group $G$, we define the value of the word $w$ at $(g_1,\dots,g_r)$ to be $w(g_1,\dots,g_r)=g_1^{l_1}\dots g_{r}^{l_r}$. The subgroup of $G$ generated by all values in $G$ of words in $W$ is called the verbal subgroup of $G$ determined by $W$,
$$W(G)=\langle w(g_1,g_2,\dots) \mid g_i\in G, w\in W\rangle.$$

On page 57, ibid.,

If $W$ is a set of words in $x_1, x_2, \dots$ and $G$ is any group, a normal subgroup $N$ is said to be $W$-marginal in $G$ if
$$w(g_1,\dots, g_{i-1}, g_ia, g_{i+1},\dots, g_r)=w(g_1,\dots, g_{i-1}, g_i, g_{i+1},\dots, g_r)$$
for all $g_i\in G, a\in N$ and all $w(x_1,x_2,\dots,x_r)$ in $W$. This is equivalent to the requirement: $g_i\equiv h_i \mod N, (1\le i\le r)$, always implies that $w(g_1,\dots, g_r)=w(h_1,\dots, h_r)$.
[The] $W$-marginal subgroups of $G$ generate a normal subgroup which is also $W$-marginal. This is called the $W$-marginal of $G$ and is written $$W^*(G).$$

On page 58, ibid.,

If $W$ is a set of words in $x_1, x_2, \dots $, the class of all groups $G$ such that $W(G)=1$, or equivalently $W^*(G)=G$, is called the variety $\mathfrak{B}(W)$ determined by $W$.

On page 60, ibid.,

Let $\mathfrak{B}$ be a variety, $F$ a group in $\mathfrak{B}$, $X$ a nonempty set, and $\sigma: X\to F$ a function. Then $(F, \sigma)$, or simply $F$, is $\mathfrak{B}$-free on $X$ if for each function $\alpha$ from $X$ to a $\mathfrak{B}$-group $G$ there exists a unique homomorphism $\beta:F\to G$ such that $\sigma\beta=\alpha$.

The Question:

Let $\mathfrak{B}$ be any variety. If $G$ is a $\mathfrak{B}$-group with a normal subgroup $N$ such that $G/N$ is a free $\mathfrak{B}$-group, show that there is a subgroup $H$ such that $G=HN$ and $H\cap N=1$.

Thoughts:
I recognise that it is equivalent to show that $G$ is an internal semidirect product $$G=H\ltimes N.$$
Internal and external semidirect products are covered on page 27, ibid.
Perhaps the $\sigma, \alpha, \beta$ from the definition of a free $\mathfrak{B}$-group with $\sigma\beta=\alpha$ can be used to construct the homomorphism $\varphi: H\to {\rm Aut}(N)$ that defines the (isomorphic, external) semidirect product.
That's all I have so far.

Please help :)
 A: You are getting too lost in the weeds. This amounts to proving that $\mathfrak{B}$-free groups are projective (relative to surjections). The proof is identical to the corresponding one for free groups among all groups, and uses the universal property of the relatively free group.
(A “relatively free group” is a group that is $\mathfrak{B}$-free in some variety $\mathfrak{B}$ that is not the variety of all groups; when $\mathfrak{B}$ is clear from context, one usually just talks about “the relatively free group”. They are so named because they are free, but only relative to groups in $\mathfrak{B}$.)
(This is written with functions on the right to match what you write about functions being evaluated left-to-right; I’m not used to it and it required me to rewrite, so if you spot a place where I put the functions or elements in the wrong order, then that’s just a typo)
Let $\pi\colon G\to F$ be a surjection between $\mathfrak{B}$-groups, where $F$ is $\mathfrak{B}$-free; let $\sigma\colon X\to F$ be the $\mathfrak{B}$-basis for $F$. Let $N=\ker(\pi)$.
For each $x\in X$, let $g_x\in G$ be such that $g_x\pi = x\sigma$. Since $G\in\mathfrak{B}$, by the universal property of $F$ there exists a group homomorphism $\psi\colon F\to G$ such that for all $x\in X$, $x\sigma\psi =g_x$.
Let $H=\langle g_x\mid x\in X\rangle = \mathrm{Im}(\psi)$. I claim $H$ is the group we want. Note that $\psi\pi=\mathrm{id}_F$, because it is the identity on $X\sigma$, and so equality follows by the uniqueness clause of the definition of relatively free group.
First, $NH=G$; indeed, if $g\in G$, then $g^{-1}(g\pi\psi)\in N$, since
$$(g^{-1}\pi)(g\pi\psi\pi) = (g\pi)^{-1}(g\pi) = e.$$
Let $h=g\pi\psi\in H$; then $g^{-1}h\in N$, hence $g^{-1}\in NH$. Thus, $g\in NH$.
Second, $N\cap H=\{e\}$. Suppose that $x$ is in the intersection. Then $x=u\psi$ for some $u\in F$, and $e=x\pi=u\psi\pi = u$; therefore, $x=u\psi=e\psi=e$.
This proves the claim.

At an even “higher level”, once we have defined $\psi$, we note that $\psi$ splits the short exact sequence
$$1\longrightarrow N\stackrel{i}{\longrightarrow} G\stackrel{\pi}{\longrightarrow} F \longrightarrow 1,$$
and therefore $G$ is isomorphic to a semidirect product $N\rtimes F$, which gives you $H$ via the isomorphism.
