The strategy is to verify $\sigma\tau(x) = \tau\sigma(x)$ for every $x \in \{1, \ldots, n\}$ by splitting into three cases depending on which cycle (if any) moves $x$.
**Step 1: Partition $\{1, \ldots, n\}$.**
Let $\sigma = (a_1\; a_2\; \ldots\; a_k)$ and $\tau = (b_1\; b_2\; \ldots\; b_m)$ with $\{a_1, \ldots, a_k\} \cap \{b_1, \ldots, b_m\} = \varnothing$. Every element $x \in \{1, \ldots, n\}$ falls into exactly one of three [sets](/page/Set): $A = \{a_1, \ldots, a_k\}$, $B = \{b_1, \ldots, b_m\}$, or $C = \{1, \ldots, n\} \setminus (A \cup B)$.
**Step 2: Verify equality on each set.**
- If $x = a_i \in A$: then $\tau(a_i) = a_i$ (since $a_i \notin B$, $\tau$ fixes it), so $\sigma\tau(a_i) = \sigma(a_i) = a_{i+1 \bmod k}$. Also $\sigma(a_i) = a_{i+1 \bmod k} \notin B$ (by disjointness), so $\tau\sigma(a_i) = \tau(a_{i+1 \bmod k}) = a_{i+1 \bmod k}$.
- If $x = b_j \in B$: by the symmetric argument, $\sigma\tau(b_j) = \tau(b_j) = b_{j+1 \bmod m}$ and $\tau\sigma(b_j) = \tau(b_j) = b_{j+1 \bmod m}$.
- If $x \in C$: both $\sigma$ and $\tau$ fix $x$, so $\sigma\tau(x) = x = \tau\sigma(x)$.
Since $\sigma\tau$ and $\tau\sigma$ agree on every element of $\{1, \ldots, n\}$, they are equal as permutations.