About first Sylow Theorem proof I've been struggling with the first Sylow theorem proof we were given in class. This is how my professor introduced us the theorem:

First Sylow Theorem: Let $G$ be a finite group. Let $\rvert G \lvert=p^nm$, where $n\geq 1$ and $p$ does not divide $m$. Then:
$(i)$ $G$ has a subgroup of order $p^i$ for every $i \in [1,n]$.
$(ii)$ Every subgroup $H$ on $G$ of order $p^{i-1}$ is a normal subgroup of a normal subgroup with order $p^{i}$, for every $i \in [1,n]$. So, if we call $H_0=\{e\}$, we have
  \begin{equation}
H_0=\{e\}\trianglelefteq H_1\trianglelefteq H_2\trianglelefteq \dots \trianglelefteq H_n, 
\end{equation}
  with $\lvert H_i \rvert=p^i$.

Here is the proof.

Proof: We know that $H_0=\{e\}$. Using the result of Cauchy's theorem, exists a $g\in G$ such that $\lvert H_1 \rvert=\lvert \langle g \rangle \rvert=p$, with $H_1 \leq G$. The main idea of the proof is to do induction on $n$, so this is what we're going to do.
· For $n=1$:
If $n=1$, then $H_1=\langle g \rangle$ is the subgroup of order $p^1=p\ $ (this prove $i$). 
Furthermore, $H_0 \trianglelefteq H_1$, because for a $h_1\in H_1$ we have:
  \begin{equation}
h_1^{-1}eh_1=e\in H_0 \implies H_0\trianglelefteq H_1. 
\end{equation}
· Suppose that we have $n \neq 1$:
By the last proposition we did on class (we proved this on our last class), we have that $H_1 \leq N_G(H_1)$. ($N_G(H_1)$ denotes the normalizer of the subgroup $H_1$)
On the same proposition, we saw that $p$ divides $[N_G(H_1):H_1].\ $ As $H_1 \trianglelefteq N_G(H_1)$ (yes, we saw this on a lemma too), we can consider
  \begin{equation}
\large^{N_G(H_1)}/_{H_1},
\end{equation}
  and then, $p$ divides the order of $\ \large^{N_G(H_1)}/_{H_1}$.
  Again by Cauchy's Theorem, $\ \large^{N_G(H_1)}/_{H_1}$ has an element of order $p$.  
Then, exists $g_2 \in G$ such that  such that $\bar{g_2}$ has order $p$ in $\ \large^{N_G(H_1)}/_{H_1}$.
By the third isomorphism theorem, we can say that $\exists H_2 \leq G$ such that $H_1 \leq H_2 \leq N_G(H_1)$. 
We have that $H_1\trianglelefteq N_G(H_1)$ and $H_2\leq N_G(H_1)$, so $H_1\trianglelefteq H_2$.
On the other hand:
   \begin{equation}
 \large^{H_2}/_{H_1}\small=\langle \bar{g_2}\rangle\implies\lvert\langle\bar{g_2}\rangle\rvert=\large\lvert^{H_2}/_{H_1}\rvert=\small\frac{\lvert H_2 \rvert}{\lvert H_1\rvert}=\frac{\lvert H_2 \rvert}{p}\implies p=\frac{\lvert H_2 \rvert}{p}\implies\lvert H_2\rvert =p^2.
 \end{equation}
If $n=2$, we have finished. If not, we repeat this process to arrive to the desired result.

I don't understand the part where uses the third isomorphism theorem, and why he can say that exists a $H_2$ subgroup of $G$ that is subgroup of $N_G(H_1)$. It's the only thing of the proof that I can't understand, so any hint or explanation would be very helpful for me. Thanks.
 A: The idea is: given a subgroup $H$ of order $p$, we look at $G/H$, which has order $p^{n-1}m$.
We can apply Cauchy's Theorem again (if $n > 1$), to obtain a subgroup $\langle gH\rangle$ of order $p$ in $G/H$.
We can look at the pre-image under $\pi: G \to G/H$ of $\langle gH\rangle$, let's call it $K$. Then $\langle gH \rangle \cong K/H$, so that $|K| = p^2$.
But now we have a problem, we have no idea if $H \unlhd K$, or even $G$ (it possibly may not be, since $\langle gH\rangle$ may not be normal in $G/H$). So how do we fix this?
Well, if we want a subgroup of $G$ that $H$ is normal in, it makes sense to look at $N_G(H)$, which is by definition the LARGEST subgroup of $G$ that $H$ is normal in.
Then we look at $\pi(N_G(H))$, which is $N_G(H)/H$. Again, Cauchy's Theorem tells us we have some $g \in N_G(H)$ such that $\langle gH\rangle$ has order $p$. To be able to apply Cauchy's Theorem, we of course need to know that $p|[N_G(H): H]\ (=|N_G(H)/H|)$ (you say you understand this part).
Again, we look at the pre-image of $\langle gH\rangle$ under $\pi$. Essentially, we've restricted the domain of $\pi$ to $N_G(H)$, which definitely gives us a group homomorphism:
$\pi|_{N_G(H)}: N_G(H) \to N_G(H)/H$.
If $K = \pi^{-1}(\langle gH\rangle)$, we see that $|K| = p^2$ as before. Note that "this time" we know $H \unlhd K$, because $K$ is a subgroup of $N_G(H)$.
Now we just "keep doing this", using $N_G(K)$ for our next iteration, until we run out of powers of $p$.
