The question: If $A$ and $B$ are square matrices of the same type such that $A^3=0$, $B^3=0$ and $AB=BA$. Show that $$\left(I+A+\frac{A^2}{2!}\right)\left(I+B+\frac{B^2}{2!}\right)=I+(A+B)+\frac{(A+B)^2}{2!}+\frac{(A+B)^3}{3!}+\frac{(A+B)^4}{4!}$$
This is how I started. $$\left(I+A+\frac{A^2}{2!}\right)\left(I+B+\frac{B^2}{2!}\right)=I+(A+B)+\frac{A^2+B^2}{2!}+AB+\frac{AB^2}{2!}+\frac{A^2B}{2!}+\frac{A^2B^2}{2!2!}$$ I tried to get $$\frac{A^2+B^2}{2!}+AB+\frac{AB^2}{2!}+\frac{A^2B}{2!}+\frac{A^2B^2}{2!2!}$$ to be equal to $$\frac{(A+B)^2}{2!}+\frac{(A+B)^3}{3!}+\frac{(A+B)^4}{4!}$$ But I'm not getting there.
Try to expand the right-hand side instead. You have
\begin{align} \frac{1}{2}(A + B)^2 &= \frac{1}{2}A^2 + AB + \frac{1}{2}B^2\\[1mm] \frac{1}{6}(A + B)^3 &= \frac{1}{2}A^2B + \frac{1}{2}AB^2\\[1mm] \frac{1}{24}(A + B)^4 &= \frac{1}{4}A^2B^2, \end{align} where I have used that $A$ and $B$ commute as well as $A^k = B^k = 0$ for all integers $k \geq 3$. Summing everything up gives you the desired result.