$D=\begin{bmatrix} 1&0&0\\ 0&2&0\\ 0&0&3\\ \end{bmatrix}$ and $P=\begin{bmatrix} 7&0&2\\ 0&1&0\\ 2&0&5\\ \end{bmatrix}$
Consider $A = P ^ {-1}DP.$ The detection value $det(A ^ 2 + A)$ is:
Thought about: ${{A}^{2}}={{P}^{-1}}DP{{P}^{-1}}DP={{P}^{-1}}DDP$, so ${{A}^{2}}+A={{P}^{-1}}D(D+{{I}_{3}})P$, and $\det (XY)=\det (X)\det (Y)$
This is just the determinant of $D^2+D$ since $$(P^{-1}DP)^2+P^{-1}DP=P^{-1}(D^2+D)P$$ where you can use the fact that $\det(XY) =\det(X) \det(Y) $ and $\det(P^{-1})=1/\det(P)$. This determinant is trivial to compute as the matrix is diagonal.