I must be misunderstanding something very elementary, because every proof I see of this uses advanced methods (including the one in my course notes). Suppose $G, H, K$ are groups such that $G \times H \cong G \times K$. We have to prove that $K \cong H$. Now we know $G \times \{ 1 \} $ is a normal subgroup of the direct product, so we can cancel it out. By the second isomorphism theorem we obtain:
$(G \times H)/G \times \{ 1 \} \cong (G \times \{ 1 \})(\{ 1 \} \times H)/G \times \{ 1 \} \cong \{ 1 \} \times H$
and likewise for $K$. Consequently, $\{ 1 \} \times K \cong \{ 1 \} \times H$ and $K \cong H$.
What is wrong with this proof?
Your error here is that you are assuming the two copies of $G$ in your group are the same subgroup, rather than different-but-isomorphic subgroups.
The result you claim is not true in general; you need to assume that the groups are e.g. finite. For example, it does not hold even if the groups are all finitely presented and $G\cong\mathbb{Z}$ (see here).