a: \(\left(x-y\right)^2=\left(x+y\right)^2-4xy\)
\(=12^2-4\cdot35\)
=144-140
=4
b: \(x^3+y^3=\left(x+y\right)^3-3xy\left(x+y\right)\)
\(=5^3-3\cdot5\cdot6\)
\(=125-15\cdot6=125-90=35\)
c: \(\left(x+y\right)^2=\left(x-y\right)^2+4xy\)
\(=8^2+4\cdot20\)
=64+80=144
d: \(x^3-y^3=\left(x-y\right)^3+3xy\left(x-y\right)\)
\(=3^3+3\cdot3\cdot40=27+9\cdot40=387\)