# If $|G| = p_1^{r_1}…p_k^{r_k}$ it is the direct internal product of its Sylow subgroups

I have a little problem with the proof of the following proposition:

Let $G$ be a finite group with $|G| = p_1^{r_1}...p_k^{r_k}$ and let's assume $n_{p_i} = 1$ $\forall i = 1,...,k$ so that $P_1,P_2,...,P_k$ are the $p_i$-subgroups of Sylow of $G$. Then $G$ is the internal direct product of $P_1,...,P_k$.

During the proof I have to show by induction that $(P_1...P_{i-1})\cap P_i = \{1\}$ and $P_1...P_i| = |P_1|... 1P_i|$.

For the case $i=2$ I have no problem proving $P_1 \cap P_2 = \{1\}$ but I don't see how $|P_1P_2| = |P_1||P_2|$ should be proved. The notes I'm reading say "as every element of $P_1P_2$ can be written I a unique way as a product of an element of $P_1$ and $P_2$. Why??

Hint: $|P_1P_2|=\frac{|P_1|\cdot|P_2|}{|P_1 \cap P_2|}$
This follows from the fact that if $n_{p_i}=1$, then $P_i$ is normal.
If $u_1,u'_1\in P_1$ and $u_2\in P_2$, you can write $u_1u_2u'_1=u_1u'_1{u'_1}^{-1}u_2u'_1$, we have ${u'_1}^{-1}u_2u'_1\in P_2$ since $P_2$ is normal.
An element of $P_1P_2$ has the form $u=u^1_{p_i}...u^n_{p_i}, u^j_{p_i}\in P_i$. If you have $u^1_{p_2}, u=u^3_{p_1}{u^3_{p_1}}^{-1}u^1_{p_2}u^3_{p_1}..u^n_{p_n}$, and ${u^3_{p_1}}^{-1}u^2_{p_2}u^3_{p_1}={u'}^1_{p_2}\in P_2, u=u^3_{p_1}{u'}^1_{p_2}..u^n_{p_i}$, by continuing this method, you can write any element $x$of $P_1P_2$ $x=u_1u_2, p_1\in P_1, u_2\in P_2$. If $u_1u_2=u'_1u'_2, u_i, u'_i\in P_i$, ${u_1}^{-1}u'_1=u_2{u'_2}^{-1}\in P_1\cap P_2=1$, thus $u_1=u'_1, u_2=u'_2$.