Identify the polynomial with the vector (transposed, can't bother texing marices ). Then T acts like multiplication by the matrix .
How to diagonalize this? Solve for to get the eigenvalues 1 and 2. The corresponding eigenspaces come from and . Gladly, each space has one unit eigenvector, and they are orthogonal by theory. Arrange these in a matrix P, and you are done.