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