Let A be a square matrix, and B a nilpotent. (size of A and B is same)
Assume AB=BA
Show that, det(A+B)=det(A)
Let A be a square matrix, and B a nilpotent. (size of A and B is same)
Assume AB=BA
Show that, det(A+B)=det(A)
Hint: Since they commute, they are simultaneously upper triangularizable. For some unitary $U$, we can write $$ UAU^* = \pmatrix{\lambda_1&&&&*\\&\lambda_2\\&&\ddots\\&&&&\lambda_n}: = T_A\\ UBU^* = \pmatrix{0&&&&*\\&0\\&&\ddots\\&&&&0} := T_B $$ Note that $\det(A + B) = \det(T_A + T_B)$
Here is an alternative proof which avoids triangularization. The proof works over any field $k$.
Case 1: $\det(A)=0$.
Then $\det(A+B)=0$, since otherwise $A+B$ is invertible, and then $A=(A+B)-B$ is invertible too (SE/119904), namely via the geometric series. This is a contradiction.
Case 2: $\det(A) \neq 0$.
Then $A$ is invertible. Then $C:=A^{-1} B$ is nilpotent with $\det(A+B)=\det(A) \det(1+C)$, so that it suffices to prove $\det(1+C)=1$. But this is clear since $0$ is the only eigenvalue of $C$ and therefore $1$ is the only eigenvalue of $1+C$. (In general, eigenvalues add when we add constants.)