Let $G$ be a finite group, and $H$, $K$ be subgroups.
Let $HK = \{hk: h \in H, k \in K\}$.
Let $\phi: H \times K \rightarrow HK $ be defined by $(h,k) \rightarrow hk$.
Let $|\phi^{-1}(g)| = |\{x:\phi(x)=g\}|$.
I'm looking to show $|\phi^{-1}(g)|=|H \cap G|$, and have managed to show $|\phi^{-1}(g)| \ge |H \cap G|$ (i.e. each group element in $HK$ is represented by at least $|H \cap K|$ products in ), using the following:
$$ hk = (hx)(x^{-1}k),\ \forall x \in (H \cap K) $$
However, I am struggling to see why $|\phi^{-1}(g)| \le |H \cap G|$ (i.e. each group element in $HK$ is represented by at most $|H \cap K|$ products in ), which would then imply the equality. I have seen proofs of this on other StackExchange answers (See paragraph 3 of the proof in this answer). The proof is rather terse, however, and I am struggling to follow it.
Could anyone give a very detailed, every-step-explained proof of this?