\(A\left(x\right)-B\left(x\right)=x^4-2x^4-2x^3+2x^3+5x^2+x^2+4+1\)
\(=-x^4+6x^2+5\)
\(A\left(x\right)-B\left(x\right)=x^4-2x^4-2x^3+2x^3+5x^2+x^2+1+4\)
\(A\left(x\right)-B\left(x\right)=6x^2-x^4+5\)
\(\text{A(x) - B(x) = }\left(x^4-2x^3+5x^2+4\right)-\left(-2x^3+2x^4-x^2-1\right)\)
\(A\left(x\right)-B\left(x\right)=x^4-2x^4-2x^3+2x^3+5x^2+x^2+4+1\)
\(A\left(x\right)-B\left(x\right)=-x^4+6x^2+5\)