Answer
See answers below
Work Step by Step
If A and B are $n × n$ matrices then
$(A+2B)^3$
$=(A+2B)(A+2B)(A+2B)$
$=(A+2B)^2(A+2B)$
$=(A^2+2AB+2AB+4B^2)(A+2B)$
$=A^3 + 2A^2B + 2ABA + 2B A^2 + 4AB^2 + 4 BAB + 4B^2 A + 8B^3$
b) We can rewrite $(A-2B)^3$ as:
$(A-2B)^3=[A+2(-B)]^3$
then $A^3-2A^2B-2ABA+4AB^2-2BA^2+4BAB+4B^2A-8B^3$