Let G be the group {e,a,b,b$^{2}$,b$^{3}$,ab,ab$^{2}$,ab$^{3}$} whose generators satisfy a$^{2}$=e,b$^{4}$=e, ba=ab$^{3}$. Write the table of G. (G is called dihedral group D4)

However, there are some elements that are not in the group like B$^2$ so I have to rewrite it but I do not know how to re-write it. I know for A$^2$=e since that is given but how do i apply it to other elements. For example, A$^2$B$^2$, it is not a column or row.Therefore it is not in group G and must be rewritten, how can i rewrite it?