Let $G$ be a finite group and $P$ be a Sylow $p$-subgroup of $G$. If $H,K\trianglelefteq G$, then prove that $$|P\cap HK|=\frac{|P\cap H||P\cap K|}{|P\cap H\cap K|}.$$
Attempt: If $H\cap K=\{e\}$, then the above equality follows from that $P\cap HK$ is a Sylow $p$-subgroup of $HK$ since $HK\trianglelefteq G$ and that the Sylow $p$-subgroup of $HK$ must have form $H'K'$. But when $H\cap K\neq\{1\}$, I don't know how to deal with it. Can anyone give some help?