`a)(x+2)^2`
`=x^2+2*x*2+2^2`
`=x^2+4x+4`
`b)(-2xy+3)^2`
`=(-2xy)^2+2*(-2xy)*3+3^2`
`=4x^2y^2-12xy+9`
`c)(x^2y+3x)^2`
`=(x^2y)^2+2*x^2y*3x+(3x)^2`
`=x^4y^2+6x^3y+9x^2`
`d)(x+y+z)^2`
`=[(x+y)+z)^2`
`=(x+y)^2+2(x+y)z+z^2`
`=x^2+2xy+y^2+2xz+2yz+z^2`
a: \(\left(x+2\right)^2\)
\(=x^2+2\cdot x\cdot2+2^2\)
\(=x^2+4x+4\)
b: \(\left(-2xy+3\right)^2\)
\(=\left(-2xy\right)^2+2\cdot\left(-2xy\right)\cdot3+3^2\)
\(=4x^2y^2-12xy+9\)
c: \(\left(x^2y+3x\right)^2\)
\(=\left(x^2y\right)^2+2\cdot x^2y\cdot3x+\left(3x\right)^2\)
\(=x^4y^2+6x^3y+9x^2\)
d: \(\left(x+y+z\right)^2\)
\(=\left(x+y\right)^2+2z\left(x+y\right)+z^2\)
\(=x^2+y^2+z^2+2xy+2xz+2yz\)