First show it has eight elements by writing down $I, A, A^2, A^3, A^4, ...$ and $B, B^2, \ldots$ and $AB, (AB)^2, \ldots$, etc.; that's what's meant by the group "generated by these matrices: all arbitrarily long products of all possible powers of the matrices.
You'll find that every sequence of $A$s and $B$s can be simplified to one of just 8. As an example, $A^2 = -I$ and
$$
AB = \begin{bmatrix} i & 0\\
0 & -i\end{bmatrix},
$$ so $(AB)^2 = -I$, hence $ABAB = A^2$, hence $BAB = A$. So in any sequence of $A$s and $B$s, you can replace a $BAB$ with a single $A$. And you can replace any odd number of $A$s, like $A^7$, with $A$ times an even number of $A$s, which turns into $\pm I$. In the $A^7$ example, we get $A^7 = A \cdot A^6 = A (A^2)^3 = A (-I)^3 = A(-I) = -A$.
(I suspect that one possible set of eight representatives is $I, A, A^2, A^3, B, AB, A^2B, A^3B$, but I'm not certain of this). To prove non-abelian-ness, you just have to find two elements $p$ and $q$ such that $pq \ne qp$.