According to Cayley Hamilton theorem: Every Square matrix satisfies its own characteristic equation. So$, P=\lambda I$ Given that $\lambda_{1}=0,\lambda_{2}=0.5,\lambda_{3}=3$ $P^{2}+2P+I=(\lambda I)^{2}+2(\lambda I)+I=\lambda ^{2}+2\lambda +1$ Put $\lambda=0$ $\lambda^{2}+2\lambda +1 = 0+0+1=1$ Put $\lambda=0.5$ $\lambda^{2}+2\lambda_{3} +1=(0.5)^{2}+2(0.5)+1=0.25+1+1=2.25$ Put $\lambda=3$ $\lambda^{2}+2\lambda +1=(3)^{2}+2(3)+1=9+6+1=16$
Look here for a good proof (Page 7), https://www.adelaide.edu.au/mathslearning/play/seminars/evalue-magic-tricks-handout.pdf
The tests are there but it ain't free. Cost is...