Let $f$ be a homomorphism from $G$ onto $H$ with $\ker f = K$.
If $S$ is any subgroup of $H$, let $S^*=\{x\in G \mid f(x)\in S\}$.
Then clearly $S^*$ is subgroup of $G$ and $K\subseteq S^*$.
Let $g$ be the restriction of $f$ to $S^*$ [i.e., $g(x)=f(x)$ for every $x\in S^*$, $S^*$ is the domain of $g$].
Then how to prove that $g$ is homomorphism from $S^*$ onto $S$ with $K=\ker g$ ?
To show that $g$ is a homomorphism note that since $f$ is one, then $f(xy) = f(x)f(y)$ for all $x$ and $y$ in G, especially for those $x$ and $y$ in $S^*$ so $g(xy) = f(xy) = f(x)f(y) = g(x)g(y)$. To show that the homomorphism is onto take any $s \in S$ then $f^{-1}(s) \subseteq S^*$ and $gf^{-1}(s) =ff^{-1}(s) = s \in S$.