\(\text{a) }ax-bx+ab-x^2\\ \\=\left(ax+ab\right)-\left(x^2+bx\right)\\ \\=a\left(x+b\right)-x\left(x+b\right)\\ \\=\left(a-x\right)\left(x+b\right)\\ \)
\(\text{b) }x^2-y^2+4x+4\\ \\ =\left(x^2+4x+4\right)-y^2\\ \\ =\left(x+2\right)^2-y^2\\ \\ =\left(x+2+y\right)\left(x+2-y\right)\\ \)
\(\text{c) }ax+ay-3x-3y\\ \\=\left(ax+ay\right)-\left(3x+3y\right)\\ \\ =a\left(x+y\right)-3\left(x+y\right)\\ \\=\left(a-3\right)\left(x+y\right)\\ \)
\(\text{d) }x^3+x^2+x+1\\ \\=\left(x^3+x^2\right)+\left(x+1\right)\\ \\=x^2\left(x+1\right)+\left(x+1\right)\\ \\=\left(x^2+1\right)\left(x+1\right)\\ \)
\(\text{e) }x^3-3x^2+3x-9\\ \\=\left(x^3-3x^2\right)+\left(3x-9\right)\\ \\ =x^2\left(x-3\right)+3\left(x-3\right)\\ \\=\left(x^2+3\right)\left(x-3\right)\\ \)
\(\text{f) }x^2+ab+ax+bx\\ \\=\left(x^2+ax\right)+\left(bx+ab\right)\\ \\ =x\left(x+a\right)+b\left(x+a\right)\\ \\=\left(x+b\right)\left(x+a\right)\\ \)
\(\text{g) }xy+1+x+y\\ \\=\left(xy+x\right)+\left(y+1\right)\\ \\=x\left(y+1\right)+\left(y+1\right)\\ \\=\left(x+1\right)\left(y+1\right)\)
\(\text{h) }9-x^2-2xy-y^2\\ \\=9-\left(x^2+2xy+y^2\right)\\ \\=3^2-\left(x+y\right)^2\\ \\=\left(3-x-y\right)\left(3+x+y\right)\\ \)
\(\text{i) }x^2-2xy+y^2-1\\ \\=\left(x^2-2xy+y^2\right)-1\\ \\=\left(x-y\right)^2-1^2\\ \\=\left(x-y-1\right)\left(x-y+1\right)\\ \)