Transition matrix.
P=(111−1).
Inverse. detP=−1−1=−2, so
P−1=−21(−1−1−11)=21(111−1).
New matrix.
P−1AP=21(111−1)(2112)(111−1).
Compute:
(2112)(111−1)=(331−1),
then
21(111−1)(331−1)=21(6002)=(3001).
Conclusion. In the basis B′, the matrix is diag(3,1).