We define the linear trasformation: $T:\mathbb{R}_2[x] \to \mathbb{R}_2[x]$, $T(p(x)) = p(x) + (x+1)p'(x)$. We have two basis:$B=\{1,x,x^2\}$ and $B'=\{1,1+x,(1+x)^2\}$. Find $[T]_{B'}$.
I tried to use two methods to solve this question just to verify if my answer is correct.
We know that: $$[T]_B = \begin{pmatrix} 1 & 0 & 0 \\ 1 & 2 & 0 \\ 0 & 2 & 3 \end{pmatrix}$$
The first method is to find $[T]_{B'}$ directly: $$[T]_B' = \begin{pmatrix} T(1)_{B'} & T(1+x)_{B'} & T(1+2x+x^2)_{B'} \end{pmatrix} = \begin{pmatrix} 1 & 0 &0 \\0 & 2 & 0 \\ 0& 0& 3 \end{pmatrix}$$
The second method is to use the formula: $[T]_{B'} = P_{B' \leftarrow B}[T]_BP_{B \leftarrow B'} $ where P is change of basis matrix.
$$P_{B \leftarrow B'} = \begin{pmatrix} 1 & 0 &0 \\1 & 1 & 0 \\ 1 & 2 & 1 \end{pmatrix}$$ $$[T]_{B'} = P_{B \leftarrow B'}^{-1} [T]_B P_{B \leftarrow B'} = \begin{pmatrix} 1 & 0 & 0 \\2 & 2 & 0 \\ 0 & 4 &3 \end{pmatrix}$$
However, I should obtain the same result. So I am not really sure where I did wrong? Because I have always used both methods to solve similar question. Not sure why it is not working this time
Note that, since $T(1)=1$, $T(x)=2x+1$, and $T(x^2)=3x^2+2x$, you actually have$$[T]_B=\begin{bmatrix}1&1&0\\0&2&2\\0&0&3\end{bmatrix}.$$