This question comes from here. It is not a duplicate but asking for explanation of the last part of the proof.
I am asked to prove that if 5 is the smallest prime dividing the order of a finite group $G$, then any subgroup of index 5 in $G$ is normal.
This is a proof I have found but don't understand the last steps. Let $H$ be a subgroup of index $5$ where $5$ is the smallest prime that divides $|G|$. Then $G$ acts on the set of left cosets of $H$, $\{gH\mid g\in G\}$ by left multiplication, $x\cdot(gH) = xgH$.
This action induces a homomorphism $G\to S_5$, whose kernel is contained in $H$. Let $K$ be the kernel. Then $G/K$ is isomorphic to a subgroup of $S_5$, and so has order dividing $5!$. But it must also have order dividing $|G|$, and since $5$ is the smallest prime that divides $|G|$, it follows that $|G/K|=5$.
I understand everything up until here: Since $|G/K| = [G:K]=[G:H][H:K] = 5[H:K]$, it follows that $[H:K]=1$, so $K=H$. Since $K$ is normal, $H$ was in fact normal.
I'm sorry I am quite new to group theory, could anybody explain how $[G:K]=[G:H][H:K]$? and if this =$5[H:K]$, how does it follow that $[H:K]=1$?