a, Với x-y=7 thì
\(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)+\left(2x-2y\right)+37\)
\(=\left(x-y\right)^2+2\left(x-y\right)+37=7^2+2.7+37\)
\(=49+14+37=100\)
Vậy A=100
b, Với x+2y=5 thì
\(B=x^2+4y^2-2x+10+4xy-4y\)
\(=x^2+4y^2-2x+2x+4y+4xy-4y=x^2+4y^2+4xy\)
\(=x^2+2.x.2y+\left(2y\right)^2=\left(x+2y\right)^2=5^2=25\)
Vậy B=25