I'm requested to list the elements and draw the multiplication table for the group $\langle a, b : |a| = 2 = |b|\rangle$ without any more details. But hence this group is infinite isn't it ?
while listing the elements i found $ = \{ a , b , ab , ba , aba , bab , abab , baba, \dots \}$
and so on ! I see that we must have an information about the order of $ab$ or $ba$?
Am I wrong ? Can anybody help me?
Why the tag "free-groups"? Yours is not a free group but a free product, namely $\;C_2*C_2\;$ = the infinite dihedral group.
By the general theory, $\;C_2*C_2\;$ is an infinite group and the only elements with finite order are those who are conjugates to one of the elements in either factor.
Thus, if we put for the first factor $\;\langle a\rangle=\{1,a\}\;$ , and for the second one $\;\langle b\rangle=\{1,b\}\;$ , the normal form of an element in this group is of the form
$$abababa\ldots\;,\;\;\text{or}\;\;bababa\ldots$$
each of the two forms above being a finite word in those two letters, and the finite order elements are those of the form $\;g^{-1}ag\;,\;\;g^{-1}bg\;,\;\;g\in C_2*C_2\;$ , for example
$$ababa=(ab)a(ba)=(ab)a(ab)^{-1}\;,\;\;abababa=(aba)b(aba)=(aba)a(aba)^{-1}\;\ldots etc.$$