I have dosed off in class way too many times and I need help with a few problems from my pre-test:

Let A = \begin{bmatrix} 1&3&-1\\2&0&5\\6&-2&4\end{bmatrix}
be the matrix of T: P_2 -> P_2 relative to basis B = {3x+3x^2, -1+3x+2x^2, 3+7x+2x^2}.
Find T(1+x^2).

A simple hint in the right direction would be greatly appreciated.