a)\(P=\left(5x-1\right)+2\left(1-5x\right)\left(4+5x\right)+\left(5x+4\right)\)
\(P=5x-1+5x+4+\left(2-10x\right)\left(4+5x\right)\)
\(P=10x+3+8+10x-40x-50x^2\)
\(P=-20x+11-50x^2\)
b)\(Q=\left(x-y\right)^3+\left(y+x\right)^3+\left(y-x\right)^3-3xy\left(x+y\right)\)
\(Q=x^3-3x^2y+3xy^2-y^3+y^3+3y^2x+3yx^2+x^3+y^3-3y^2x+3yx^2-x^3-3x^2y+3xy^2\)
\(Q=x^3+y^3\)