a) Ta có: \(x^2+2x-y^2+1\)
\(=\left(x^2+2x+1\right)-y^2\)
\(=\left(x+1\right)^2-y^2\)
\(=\left(x+1-y\right)\left(x+1+y\right)\)
b) Ta có: \(x^2+3x-y^2+3y\)
\(=\left(x^2-y^2\right)+\left(3x+3y\right)\)
\(=\left(x-y\right)\left(x+y\right)+3\left(x+y\right)\)
\(=\left(x+y\right)\left(x-y+3\right)\)
c) Ta có: \(3\left(x+3\right)-x^2+9\)
\(=3\left(x+3\right)-\left(x^2-9\right)\)
\(=3\left(x+3\right)-\left(x-3\right)\left(x+3\right)\)
\(=\left(x+3\right)\left[3-\left(x-3\right)\right]\)
\(=\left(x+3\right)\left(3-x+3\right)=\left(x+3\right)\left(-x+6\right)\)
\(=\left(x+3\right)\left(6-x\right)\)
b, \(x^2+3x-y^2+3y\)
=\(\left(x^2-y^2\right)+\left(3x+3y\right)\)
=(x+y)(x-y)+3(x+y)
=(x+y)(x-y+3)
c,\(3\left(x+3\right)-x^2+9\)
=\(3\left(x+3\right)-\left(x^2-9\right)\)
=3(x+3)-(x+3)(x-3)
=(x+3)(3-x+3)
=(x+3)x