Over a year ago now I asked a bad question. Recently I was reminded of this question, though in the year of growth I've had as a mathematician and MSE user, I have gained the language to make precise what was once a glimmer of an idea. I apologize for reposting, but I think this is sufficiently changed to warrant an entirely new question.
Given a group hom $\varphi : G \to H$, we can look at its mono-epi factorization $\varphi = \iota \pi$:
Here $N = \text{Ker }\varphi$ is the obstruction to $\varphi$'s injectivity, and it is natural to ask if we can extend $H$ by $N$ in a way that is compatible with $\varphi$. However, I think this question is best phrased geometrically.
We can view $G$ as a bundle over $G/N$, where each fibre is isomorphic to $N$. Then since $G/N$ includes into $H$, our question becomes this: Can we extend this bundle structure from $G/N$ to all of $H$ in a way that is compatible with the group structure of $G$?
Ideally, we should end with a commutative square of the following sort:
This has to do with solving an extension problem
and I suspect this will require other geometric tools, such as group cohomology.
Is this problem solvable? Even special cases would be of interest. Have people considered this problem before? I would be happy for references to papers or books.
Thanks in advance ^_^



Note added in edit: I misunderstood the question the first time around---see comments. I left the original here so everything still makes sense.
OK, this looks like you are trying to define a semidirect product. The easiest way to describe such a thing is that the short exact sequence defining $G$ splits, i.e., the map $\iota$ above has an inverse $\theta$ so that the composition is the identity on $G/N$. This allows you to extend the multiplication on $H$ to one on $G$, i.e., embed $H$ as a subgroup of $G$.
If $N$ is abelian, this is equivalent to the vanishing of the second cohomology group of $H$ on $N$, via conjugation action. The same holds for general $N$ but you need to use non-abelian cohomology.
Edit: Let $G$ be a central extension of a simple group $X$ by a group $Z$, so an element of $H^2(Z,G)$ essentially. The group $X$ can be embedded in another simple group $Y$ such that there is no non-split extension of $Y$ by $Z$. An easy example is alternating groups. The Schur multiplier (largest central extension) of $A_7$ is cyclic of order $6$, whereas for $A_8$ it's cyclic of order $2$. Thus the group $3\cdot A_7$ cannot be extended to a group $3\cdot A_8$.