Showing that if $Hg^{−1}_1 = Hg^{−1}_2$, then $g_1H = g_2H.$ $Hg^{−1}_1 = Hg^{−1}_2 \implies g_1H = g_2H $ 
I have a really quick question. I was doing some Group theory exercises, for this particular question I couldn't understand the proof: 

"Since $Hg^{-1}_1=Hg^{-1}_2$ there is an $h \in H$ with $g^{-1}_1=hg^{-1}_2$ and $g_2=g_1h$."

How do I know that? I couldn't understand the equality and how $g_2=g_1h$. Thanks a lot in advance!

If 
$Hg_1^{-1} = Hg_2^{-1}, \tag 1$
we choose 
$e \in H, \tag 2$
where $e$ is the identity element of $G$; we know (2) binds since $H$ is a subgroup of $G$; then
$g_1^{-1} = eg_1^{-1} \in Hg_2^{-1} \tag 3$
by virtue of (1); thus 
$\exists h \in H, \; g_1^{-1} = hg_2^{-1}; \tag 4$
this yields
$e = g_1g_1^{-1} = g_1hg_2^{-1}, \tag 5$
and this further yields
$g_2 = eg_2 = (g_1hg_2^{-1})g_2 = g_1h(g_2^{-1}g_2) = g_1he = g_1h, \tag 6$
the desired relation 'twixt $g_1$, $g_2$, and $h$.
