Compound Angle formula using Matrices show that 
$$
\cos(A+B)=\cos(A)\cos(B)-\sin(A)\sin(B)\\
\text{ if } AB=BA
$$
the question gives a hint to use:
$$
\sin(A)=\frac{1}{2i}(e^{iA}-e^{-iA})\\
\cos(A)=\frac{1}{2}(e^{iA}+e^{-iA})
$$

Using the hint, and we'd like to apply the identity $e^{A+B}=e^Ae^B$ to get $$\cos(A+B)=1/2(e^{i(A+B)}+e^{-i(A+B)})=1/2(e^{iA}e^{iB}+e^{-iA}e^{-iB})=$$
$$1/4[(e^{iA}e^{iB}+e^{-iA}e^{-iB}+e^{iA}e^{-iB}+e^{-iA}e^{iB})+(e^{iA}e^{iB}+e^{-iA}e^{-iB}-e^{iA}e^{-iB}-e^{-iA}e^{iB})]=$$
$$=\cos(A)\cos(B)-\sin(A)\sin(B)$$
So all we've got to prove is that identity when $AB=BA$. This is done as follows:
Observe that in the power series expansion 
$$I+A+B+1/2!(A+B)^2+1/3!(A+B)^3+...$$
of $e^{A+B}$, if we expand out the powers of $A+B$ there are only a finite number of terms of any fixed degree $n$, where $n$ is the sum of the power of $A$ and the power of $B$. Similarly, in the product of power series
$$e^Ae^B=(I+A+(1/2!)A^2+...)(I+B+(1/2!)B^2+...)$$
we can't get any more terms of degree $n$ once we're multiplying terms of degree $n+1$ or higher from either multiplicand.
So verifying $e^{A+B}=e^Ae^B$ reduces to finite verifications that the part of each power series of degree $n$ equals that part of the other. For instance, the degree 0 parts are both $I$, since in the product the only two matrices I can multiply to get $I$ are $I$ from the left and $I$ from the right. Let's look at a higher degree, say, 3. We have
$$(1/3!)(A+B)^3=(1/3!)(A^3+AB^2+BAB+B^2A+A^2B+ABA+BA^2+B^3)$$
while the degree-3 part of $e^Ae^B$ is
$$(1/3!)IB^3+(1/2!)AB^2+(1/2!)A^2B+(1/3!)A^3I$$
Now we see why the hypothesis $AB=BA$ matters: in general these two expressions aren't equal at all! But using commutation we can collect, for instance, $AB^2,BAB,$ and $B^2A$ all together, and we see that in fact the two power series do agree on their degree-3 parts.
To carry out the proof for general $n$ is essentially just to point out that since $A$ and $B$ commute, the standard binomial theorem applies for $(A+B)^n$, and that in the expansion of $e^Ae^B$ we get the binomial coefficients. 
