If $P$ is a Sylow subgroup of $A$ and $Q$ is a Sylow subgroup of $B$, then $P \times Q$ is a Sylow subgroup of $A \times B$. We will show that every Sylow subgroup of $A \times B$ is of this form, which proves the claim.
Suppose that $H$ is a Sylow subgroup of $A \times B$. Let $\pi_A: A \times B \rightarrow A$ and $\pi_B: A \times B \rightarrow B$ be the projection homomorphisms. Since $\pi_A(H)$ and $\pi_B(H)$ are both $p$-groups and $H$ is contained in the product $\pi_A(H) \times \pi_B(H)$, we get $H = \pi_A(H) \times \pi_B(H)$. From this it follows that $\pi_A(H)$ is a $p$-Sylow subgroup of $A$, because otherwise the order of $H$ would be smaller than the largest power of $p$ dividing $|A \times B|$. By the same argument $\pi_B(H)$ is a $p$-Sylow subgroup of $B$.