The solution was confusing to me so I did it this way:
$E=[e^x,xe^x,x^2e^x]$
$[D(f)]_E=A[f]_E$
$A$ is a $3x3$ matrix where a$_j=[D($e$_j)]_E$ for $j = 1, 2, 3$
But I am stuck on evaluating them. The way I had it in my head was for example:
a$_1=[D($e$_1)]_E = [e^x]_E = (1,0,0)^T$
I don't think it makes sense going from $[D($e$_1)]_E = [e^x]_E$
I don't see how I can take derivative of e$_1$ which is a standard basis vector of $(1,0,0)^T$. This entire attempt is probably incorrect, but it made the most sense to me.

When you write $e_1=(1,0,0)$, you should be referring to a basis, in this case the basis is $\{ e^x, xe^x, x^2e^x\}$
Think of $(1,0,0)$ as representation of $1\cdot e^x + 0\cdot xe^x + 0 \cdot x^2e^x$ which explains why did they compute $D(1\cdot e^x + 0\cdot xe^x + 0 \cdot x^2e^x)=D(e^x)$ in their working.