(d) Let $\beta = \{x^2, x, 1\}$ and $\gamma = \{x^3, x^2, x, 1\}$ be the ordered bases of $P2$ and $P3$, respectively. Find the matrix representation $A$ of $T$ relative to $\beta$ and $\gamma$.