a: \(\left(x-1\right)\left(x-3\right)-x^2\)
\(=x^2-3x-x+3-x^2\)
=-4x+3
b: \(\left(x-3\right)\left(x+3\right)+x\left(1-x\right)\)
\(=x^2-9+x-x^2\)
=x-9
c: \(\left(x+2\right)^2-x\left(x-3\right)\)
\(=x^2+4x+4-x^2+3x\)
=7x+4
d: \(\left(x-2\right)\left(x^2+2x+4\right)\)
\(=x^3+2x^2+4x-2x^2-4x-8\)
\(=x^3-8\)