a) \(x\left(x+2\right)+y\left(y-2\right)-2xy+37\)
\(=x^2+2x+y^2-2y-2xy+37\)
\(=\left(x^2-2xy+y^2\right)+2x-2y+37\)
\(=\left(x-y\right)^2+2\left(x-y\right)+37\)
\(=7^2+2.7+34\)
\(=100\)
b) \(x^2\left(x+1\right)-y^2\left(y-1\right)+xy-3xy\left(x-y+1\right)-95\)
\(=x^3+x^2-y^3+y^2+xy-3xy-3xy\left(x-y\right)-95\)
\(=x^3+x^2-y^3+y^2-2xy-3xy\left(x-y\right)-95\)
\(=\left(x-y\right)^3+\left(x-y\right)^2-95\)
\(=7^3+7^2-95\)
\(=297\)