Find linear transformation given its matrix representation 
If $$A = \left[ \begin{matrix} 1 & -1 & 2 \\
                         -2 & 1 & -1 \\
                          1 & 2 & 3 
\end{matrix} \right]$$ is the matrix representation of a linear transformation $T: P_2(x) \to P_2(x)$ with respect to the bases 
  $\{1-x, x(1-x), x(1+x)\}$ and $\{1, 1+x, 1+x^2\}$, then find $T$.

I have tried it but could not able to get the solution.

The relation between $A$ and $T$ is
$$A\left[a + bx + cx^2\right]_{\mathcal B} = \left[T\left(a + bx + cx^2\right)\right]_{\mathcal B'}$$
where $\mathcal B$ is the first basis, $\mathcal B'$ is the second basis, and $[ \cdot ]_{\mathcal B}$ denotes the coordinate matrix in basis $\mathcal B.$
To find $T,$ we compute as follows:
$$\begin{align}
A\left[a + bx + cx^2\right]_{\mathcal B} & = A\left[a(1 - x) + \frac{a + b - c}2 x(1 - x) + \frac{a + b + c}2 x(1 + x)\right]_{\mathcal B}\\
& = \begin{bmatrix} 1 & -1 & 2 \\ -2 & 1 & -1 \\ 1 & 2 & 3\end{bmatrix} \frac12 \begin{bmatrix} 2a\\ a + b - c\\ a + b + c\end{bmatrix}\\
& = \frac12 \begin{bmatrix} 3a + b + 3c\\ -4a - 2c\\ 7a + 5b + c\end{bmatrix}.\end{align}$$
Comparing that last expression to the right side of the first displayed equation, we see that
$$\begin{align}
T\left(a + bx + cx^2\right) & = \tfrac12 \left((3a + b + 3c) \cdot 1 + (-4a - 2c)(1 + x) + (7a + 5b + c)\left(1 + x^2\right)\right)\\
& = \tfrac12 \left((6a + 6b + 2c) - (4a + 2c)x + (7a + 5b + c)x^2\right).\end{align}$$
Thus, $T$ is given by
$$T\left(a + bx + cx^2\right) =  3a + 3b + c - (2a + c)x + \tfrac12 (7a + 5b + c)x^2.$$
