Factorize completely X2+2XY+Y2+3X+3Y-18

A.

(x + y + 6)(x + y -3)

B.

(x - y - 6)(x - y + 3)

C.

(x - y + 6)(x - y - 3)

D.

(x + y - 6)(x + y + 3)

Correct answer is A

\(x^{2} + 2xy + y^{2} + 3x + 3y - 18\)

\(x^{2} + 2xy + 3x + y^{2} + 3y -18\)

\(x^{2} + 2xy - 3x + 6x + y^{2} -3y + 6y -18\)

\(x^{2} + 2xy -3x + y^{2} -3y + 6x + 6y -18\)

\(x^{2} + xy -3x + xy + y^{2} - 3y + 6x + 6y -18\)

x(x + y - 3) + y(x + y - 3) + 6(x + y - 3)

= (x + y - 3)(x + y + 6)

= (x + y + 6)(x + y -3)