This is Exercise 4.2 of Roman's, "Fundamentals of Group Theory: An Advanced Approach". According to this MSE search and this Approach0 search, it is new to MSE.
The Question:
Let $G$ and $K$ be groups with $H\le G$. Show that it is not always possible to extend a homomorphism $\sigma:H\to K$ to $G$.
Thoughts:
This looks, prima facie, like a job for the extreme cases, like $K$ (and hence $H$) being trivial, although I haven't found anything; the solution seems more elusive than that.
My second idea came in the form of supposing $G$ and $K$ are finite, then employing some trick - I don't know what yet - with the orders of the groups involved, like Lagrange's Theorem for the subgroup $H$ in $K$, aiming to get $\lvert \sigma'(G)\rvert\nmid \lvert K\rvert$ somehow, for some potential extension $\sigma':G\to K$. This seems feasible at first but, after a while, I have doubts.
Besides, I'm not entirely sure whether the extension is from $H$ to $G$ or from $K$ to $G$ (if you see what I mean). The word "extension" is defined only once prior to the exercise ibid. but it is in an entirely different context. For completeness, here is that definition:
Let $G$ be a group. We refer to subgroups $H$ and $K$ of $G$ for which $H\le K$ as an extension.
Please help :)
The division-by-$2$ map $2\mathbb{Z}\rightarrow\mathbb{Z},\,k\mapsto k/2$ is a bona fide group homomorphism, but it cannot be extended to a group homomorphism $\mathbb{Z}\rightarrow\mathbb{Z}$, for such an extension $\tilde{f}$ would have to satisfy $$1=f(2)=\tilde{f}(2)=2\tilde{f}(1),$$ yet no such integer $\tilde{f}(1)$ exists.