Calculate the matrices of $R$ and $R\circ R$ with respect to the basis $(e_1,e_2,e_3,e_4)=(1,x,\frac{1}{2}x^2,\frac{1}{6}x^3)$ I am unsure how to calculate the basis matrices of the linear map defined below. I appreciate your help.
Let $V=\mathbb{Q}[x]_{\le3}$ be the set of polynomials over $\mathbb{Q}$ of degree at most $3$. Define $R:V \rightarrow V$ by $R(f)=xf''-5f$ where $f':=df/dx$. Prove that $R$ is linear (here the base field $K=\mathbb{Q}$). Calculate the matrices of $R$ and $R\circ R$ with respect to the basis $(e_1,e_2,e_3,e_4)=(1,x,\frac{1}{2}x^2,\frac{1}{6}x^3)$.
I proved that it's linear.
Now, $R(1) =-5$, $R(x) =-5x$, $R\left(\frac{1}{2}x^2\right) = x-\frac{5}{2}x^2$, $R\left(\frac{1}{6}x^3\right) = x^2-\frac{5}{6}x^2$.
Then the basis matrix of $R$ is as follows
$$\begin{pmatrix}
-5 & 0 & 0 & 0\\ 
0 & -5 & 1 & 0\\ 
0 & 0 & -5/2 & 1\\ 
0 & 0 & 0 & -5/6
\end{pmatrix}.$$
I want to find the matrices of $R \circ R$, so I thought of multiplying the matrix of R together
$$\begin{pmatrix}
-5 & 0 & 0 & 0\\ 
0 & -5 & 1 & 0\\ 
0 & 0 & -5/2 & 1\\ 
0 & 0 & 0 & -5/6
\end{pmatrix}\begin{pmatrix}
-5 & 0 & 0 & 0\\ 
0 & -5 & 1 & 0\\ 
0 & 0 & -5/2 & 1\\ 
0 & 0 & 0 & -5/6
\end{pmatrix} = \begin{pmatrix}
25 & 0 & 0 & 0\\ 
0 & 25 & -15/2 & 1\\ 
0 & 0 & 25/4 & -20/6\\ 
0 & 0 & 0 & 25/36
\end{pmatrix}.$$
I also tried of $R(R(1)) =25$, $R(R(x)) =25x$, $R\left(R\left(\frac{1}{2}x^2\right)\right) = -10x+\frac{25}{2}x^2$, $R\left(R\left(\frac{1}{6}x^3\right)\right) = -8x-5x^2-\frac{25}{6}x^3$ which results in the matrix
$$\begin{pmatrix}
25 & 0 & 0 & 0\\ 
0 & 25 & -10 & -8\\ 
0 & 0 & 25/2 & -5\\ 
0 & 0 & 0 & 25/6
\end{pmatrix}.$$
Which way is the correct one? Thank you for your time.

The matrix of $R$ is wrong. 
For example $R(e_3)=R\left(\frac{1}{2}x^2\right)=x-\frac52x^2=x-5\cdot\left(\frac12x^2\right)=e_2-5e_3$...
