I need some perspective to know if my solution is correct.
I suppose there exist $a \neq e \in A \cap B$, then $a^{|A|}=e $ and $a^{|B|}=e $.
Considering that $|A| \neq 1$ and $|B| \neq 1$ (otherwise it's obvious), then $gcd(|A|,|B|)\neq 1$ $\longrightarrow$ contradiction.
What do you say?