First observe the determinant of a triangular matrix is just the product of the diagonal entries. This is obvious if you compute the determinant by the cofactor expansion along the 1st row in the case of lower triangular matrices (or 1st column in case of upper triangular matrices).
Now to compute the eigen values you need to compute det(λI-A) and equate it to 0. If the diagonal entries of A are x,y,z etc the diagonal entries of λI-A (which is also triangular as A is triangular) are λ-x,λ-y,λ-z... So the determinant is (λ-x)(λ-y)(λ-z)... When we equate the determinant to 0 we have (λ-x)(λ-y)(λ-z)...=0 and this yields the eigen values as x,y,z... the same as the diagonal entries.
Note: If your book defines the eigen values as the roots of det(A-λI) then proceed the same way. You end up with (x-λ)(x-λ)(x-λ)...=0 Now multiply by -1 n times on both sides to convert the equation to (λ-x)(λ-y)(λ-z)...=0.