Suppose that $(G, \cdot)$ and $(H, *)$ are groups. If $K \trianglelefteq H$, $G \cong H$ and the mapping $\pi: G \to H/K$ is defined as $\pi (g) = \varphi(g)K$, prove that it is well-defined. Here $\varphi$ is any isomorphism from $G$ to $H$.
How can I prove that $\pi$ is well-defined?
My attempt:
I tried using this post for my attempt, but it is with $G/N$ (for some normal subgroup $N$ in $G$; in that post used $H$ instead of $N$, but it doesn't matter) for my proof, but it seems difficult for $H/K$ (used in the sentence at the beginning). In particular, suppose that $\pi: G \to H/K$ such that $\pi (g) = \varphi (g)K$ (here $K \trianglelefteq H$) and $g_1, g_2 \in G$ such that $g_1 = g_2$. Denote $e$ the identity element in G and $e_H$ the identity element in $H$.
Then, $g_1 \cdot g_2^{-1} = e$. So, $\varphi(g_1 \cdot g_2^{-1}) = \varphi(e) = e_H$ This means that $g_1 \cdot g_2^{-1} \in \text{Ker}(\varphi)$. Here is where I'm stuck.
Any help will do. Hope that this is understandable.
Motivation
This is from a proof I want to do that includes normal subgroups, kernels, etc. It is from my previous post.
$g_1 \cdot g_2^{-1}\in \kerφ$, then $\ker φ =1$ because $φ$ is isomorphism. Hence, $g_1=g_2$, implies $φ(g_1) =φ(g_2)$ and $φ(g_1)\cdot K = φ(g_2)\cdot K$. Therefore $\pi(g_1) = \pi(g_2)$.