a: \(2y\left(x+2\right)-3x-6\)
\(=2y\left(x+2\right)-3\left(x+2\right)\)
\(=\left(x+2\right)\left(2y-3\right)\)
b: \(3\left(x+4\right)-x^2-4x\)
\(=3\left(x+4\right)-\left(x^2+4x\right)\)
\(=3\left(x+4\right)-x\left(x+4\right)\)
\(=\left(x+4\right)\left(3-x\right)\)
c: \(2\left(x+5\right)-x^2-4x\)
\(=2x+10-x^2-4x\)
\(=-x^2-2x+10\)
\(=-x^2-2x-1+11\)
\(=11-\left(x^2+2x+1\right)\)
\(=11-\left(x+1\right)^2\)
\(=\left(\sqrt{11}-x-1\right)\left(\sqrt{11}+x+1\right)\)
d: \(x^2+6x-3x-18\)
\(=\left(x^2+6x\right)-\left(3x+18\right)\)
\(=x\left(x+6\right)-3\left(x+6\right)\)
\(=\left(x+6\right)\left(x-3\right)\)