since -2 and 3 are eigenvalues of A, det(xI - A) = (x+2)(x-3) = x^2 - x - 6.

since every matrix satisfies its own characteristic polynomial, A^2 = A + 6I.

thus B = A^2 - 2A - 3I = A + 6I - 2A - 3I = -(A - 3I).

but A - 3I is singular, since for any eigenvector v belonging to the eigenvalue 3, (A - 3I)v = 0.

thus B is singular as well, since B(-v) = -Bv = (A - 3I)v = 0, so det(B) = 0.

now, tr(B) = tr(-A+3I) = tr(-A) + tr(3I) = -tr(A) + 6.

since tr(A) is the sum of the eigenvalues of A, tr(A) = 1, hence tr(B) = -1 + 6 = 5.