I have the following problem:
Let $n\geq 3$. We want to show that the alternating group $A_n$ is generated by cycles of the length $3$. To do so we let $H\subset A_n$ be the subgroup generated by all the cycles $(uvw)$ where u,v,w are pairwise distinct integers in $\{1,...n\}$. The goal is to show that $H=A_n$.
I have just shown that it is enough to show it for $(ab)(cd)$ where $a\neq b, c\neq d$. Now I need to show what would happen if $\{a,b\}=\{c,d\}$. W.l.o.g. we can assume that $a=c, b=d$ but then $(ab)(cd)=(ab)(ab)=(ab)$ but now I don't see what to say about $(ab)$ I think it should be in $H$. Am I wrong?
You're wrong.
Consider $(ab)(ab)$. For all $x\notin\{ a,b\}$, $x$ maps to $x$ under $(ab)$; as for $a,b$, we have
$$\begin{align} a&\xrightarrow{(ab)}b\xrightarrow{(ab)}a\\ b&\xrightarrow{(ab)}a\xrightarrow{(ab)}b. \end{align}$$
Therefore, $(ab)(ab)=e$, not $(ab)$.