a) \(2x^2+x^3+4y+2xy=x^2\left(2+x\right)+2y\left(2+x\right)=\left(x^2+2y\right)\left(2+x\right)\)
b) \(\left(3x+1\right)^2-\left(x+1\right)^2=\left(3x+1+x+1\right)\left(3x+1-x-1\right)\)
\(=\left(4x+2\right)\left(2x\right)=2.\left(2x+1\right).2x=4x\left(2x+1\right)\)
c) \(\left(x+y\right)^2-\left(x-y\right)^2=\left(x+y+x-y\right)\left(x+y-x+y\right)\)
\(=2x.2y=4xy\)