a: \(B=x\left(x+y\right)\left(x-y\right)\left(x+2y\right)+y^4\)
\(=\left(x^2+xy\right)\left(x^2+2xy-xy-2y^2\right)+y^4\)
\(=\left(x^2+xy\right)\left(x^2+xy-2y^2\right)+y^4\)
\(=\left(x^2+xy\right)^2-2y^2\left(x^2+xy\right)+y^4\)
\(=\left(x^2+xy-y^2\right)^2\)
b: \(C=\left(x-y\right)\left(x-4y\right)\left(x-2y\right)\left(x-3y\right)+y^4\)
\(=\left(x^2-5xy+4y^2\right)\left(x^2-5xy+6y^2\right)+y^4\)
\(=\left(x^2-5xy\right)^2+10y^2\left(x^2-5xy\right)+25y^4\)
\(=\left(x^2-5xy+5y^2\right)^2\)