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