Yes, it is correct.
Incidentally, did you already learn about the eigenvalues of triangular matrices?
Did you perhaps already learn about the trace of a matrix (= the sum along the main diagonal)?
This could help you to calculate the required quantity without having to set up the characteristic polynomial. (Of course, that is not much work here, either.)