I'm working on my homework assignment and I came upon this question. 
Going about part a. I easily found $p(x) = c_0 + c_1x + ... + c_nx^n$ and $p = [c_0 ,..., c_n]^T$, $q(x) = c_1 + 2c_2x + ... + nc_nx^(n-1)$, $q = [c_1, ... ,nc_n, 0]^T$. How exactly is $D_2$ found and how could I find $D_n$?
You can try turning this matrix equation into system of equations: $$D_n(1,1)*p(1) + ... D_n(1,n)*p(n) = q(1)$$ $$...$$ $$D_n(n,1)*p(1) + ... D_n(n,n)*p(n) = q(n)$$
and find every element of matrix $D_n$ just from making left side of every equation identically equal to right side, for example first equation of this example that you have: $$D(1,1)*c_0 + D(1,2)*c_1 + D(1,3)*c_2 = c_1$$ It is obvious that $D(1,2)$ must be 1 and $D(1,1)$ and $D(1,3)$ must be 0