Multiplication with unknown actually isn't much different from usual vertical multiplication we do,you can refer to the steps above.
Basically,it is 3x^2-5x+1 seperately times 4,2x and x^2,then we would add them up.
Thus the answer is D.
Apologies for my terrible handwriting^^;
Hope it helps!