There is a useful identity for adding two cubes with opposite signs:
(x+y)3+(x−y)3=2x3+6xy2
Since I commutes with every matrix, this identity applies here.
Applying with x=A, y=I:
(A+I)3+(A−I)3=2A3+6A⋅I2
Since I2=I:
(A+I)3+(A−I)3=2A3+6A
Substituting into the original expression:
3[(A−I)3+(A+I)3]−15A
=3[2A3+6A]−15A
=6A3+18A−15A
=6A3+3A
Since A2=I:
A3=A⋅A2=A⋅I=A
So,
6A3+3A=6A+3A=9A