Let $(v_1, v_2)$ be a basis for $\text{Im}(p)$ and $(v_3)$ be a basis for $\ker(p)$. Prove that $B' = (v_1, v_2, v_3)$ is a basis for $V$ . Let $B = (1, X, X^2)$ be a basis for $\mathbb{R}_2[X]$ and $p ∈ \mathcal{L}\big(\mathbb{R}_2[X]\big)$ be the linear map defined by $p(1) = \frac{1}{3}(2 − X − X^2)$, $p(X) = \frac{1}{3}(−1 + 2X − X^2)$ and  $p(X^2) = \frac{1}{3} (−1 − X + 2X^2)$. 
By definition of the task, I found that $A=M_B(p)$, which is the matrix of 
$p$ with respect to the basis $B$.
\begin{bmatrix}
    \frac{2}{3} & -\frac{1}{3} & -\frac{1}{3} \\
    -\frac{1}{3} & \frac{2}{3} & -\frac{1}{3} \\
    -\frac{1}{3} & -\frac{1}{3} &\frac{2}{3} \\
\end{bmatrix}
(i) Let $(v_1, v_2)$ be a basis for $\text{Im}(p)$ and $(v_3)$ be a basis for $\ker(p)$. Prove that $B' = (v_1, v_2, v_3)$
is a basis for $V$ .
I proved that for all $v$ ∈ V we have $v =\big(v-p(v)\big)+p(v)$.
If $y\in\ker(p) ∩ \text{Im}(p)$, then $y = p(v)$ for some $v ∈ V$. 
Then, $y = p(y) = p^2(v) = 0$. That is, $(p ◦ p)(y) = p(p(y)) = p(v) = 0$ Hence, $\ker(p) ∩ \text{Im}(p)= \{0\}$.
Also, $\ker(p) + \text{Im}(p) ∈ V$, since each is a subspace of $V$ and their sum is a subspace as well. 
(ii) Also, I am asked to compute $M = M_{B'}(p)$. 
I know that $A^2 = A$, so $p(v) = p\big(p(w)\big) = (p ◦ p)(w) = p (w) = v$, but I struggling to continue further. 
How should I better approach this?
 A: 1) I think you got the general idea but you should write it out more clearly.
Notice that $A^2 = A$
Let $v\in Im  \; p$ then $\exists w \in V : v = Aw.$ And $$Av = A^2w = A w = v.$$
Therefore the restriction of $p$ to the subspace $Im \; p$ is the identity.
Let $v \in \ker p \in Im \; p$ then
$$v =  \underbrace{v - p(v)}_{\in \ker\;p}  + \underbrace{p(v)}_{\in Im \;p}.$$
Now show that $ Im \; p \cap \ker p = \{0\}$. Let $y \in Im \; p \cap \ker p \Rightarrow  \exists v \in V: y = p(v).$
Since $y \in Im \; p : p(y) = y$ but $y \in \ker p$ so we also have $p(y) = 0.$
So $ Im \; p \cap \ker p = \{0\}$ and we have $V = Im \; p \oplus \ker p$.
Therefore 
$$ B = \{v_1,v_2,v_3\}$$
is a basis of $V$. 
2) Let 
$$A = 
\begin{bmatrix}
    \frac{2}{3} & -\frac{1}{3} & -\frac{1}{3} \\
    -\frac{1}{3} & \frac{2}{3} & -\frac{1}{3} \\
    -\frac{1}{3} & -\frac{1}{3} &\frac{2}{3} \\
\end{bmatrix}
$$
Since $B' = \{v_1,v_2,v_3 \}$ is a basis of $V$ we have $ \forall v \in V , \exists \lambda_1,\lambda_2,\lambda_3 :  v = \sum_i \lambda_i v_i$. 
Finally since $v_1,v_2 \in Im \; p$ and $v_3 \in \ker p$ and $p$ is linear:
\begin{align*}
p(v) &= p (\sum_i \lambda_i v_i) \\
     &= \sum_i \lambda_ip(v_i) \\
&=\lambda_1 v_1 + \lambda_2 v_2 + \lambda_3p(v_3) \\
&=  \lambda_1 v_1 + \lambda_2 v_2 + 0.
\end{align*}
The matrix in the basis $B'$ is 
$$M =   
\begin{bmatrix}
 1 & 0 & 0 \\
 0& 1 & 0 \\
0& 0 & 0\\
\end{bmatrix}.
$$
You can see  $p$ as a projection of $R_2[X]$ onto the subspace $ Im \; p$.
