TITLE: Is this a valid proof of the contrapositive?
QUESTION [5 upvotes]: The question is the following: if $a$ and $b$ are distinct group elements, then either $a^2 \neq b^2$ or $a^3 \neq b^3$. I find this difficult to prove directly, so I formulated the contrapositive to be: if both $a^2 = b^2$ and $a^3 = b^3$, then $a = b$. 
The proof is simple: Suppose that $a^2 = b^2$ and $a^3 = b^3$. Then $a^3 = b^3 \Rightarrow a^2 = a^{-1}b^3 \Rightarrow a^{-1}b^3 = b^2$ which then implies that   $\Rightarrow a^{-1}b^2 = b \Rightarrow a^{-1}b = e \Rightarrow b = a$.
Is this correct? I feel like there's a hole somewhere.

REPLY [3 votes]: As the comments have pointed out, you've done your proof correctly. Good job! Here's how you can organize the steps into a single chain of equalities:
$$
a = a^3a^{-2} = (a^3)(a^2)^{-1} = (b^3)(b^2)^{-1} = b^3b^{-2}=b
$$