If A and B are two matrices such that AB = B and BA = A, then A^2 + B^2 is equal to (a) 2AB (b) 2BA (c) A + B (d) AB