a) \(\left(x+y\right)^2+\left(x-y\right)^2+\left(x+y\right)\left(x-y\right)\)
\(=x^2+2xy+y^2+x^2-2xy+y^2+x^2-y^2\)
\(=3x^2+y^2\)
b)\(\left(3x+y\right)^2+\left(3x-y\right)^2-\left(2x+y\right)\left(2x-y\right)\)
\(=9x^2+6xy+y^2+9x^2-6xy+y^2-4x^2+y^2\)
\(=14x^2+3y^2\)
c) \(2\left(x-y\right)\left(x+y\right)+\left(x+y\right)^2+\left(x-y\right)^2\)
\(=\left(x-y\right)^2+2\left(x-y\right)\left(x+y\right)+\left(x+y\right)^2\)
\(=\left(x-y+x+y\right)^2\)
\(=4x^2\)
d)\(-2\left(x^2-9y^2\right)+\left(x-3y\right)^2+\left(x+3y\right)^2\)
\(=\left(x+3y\right)^2-2\left(x+3y\right)\left(x-3y\right)+\left(x-3y\right)^2\)
\(=\left(x+3y-x+3y\right)^2=9y^2\)