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?