\(ax^2-3axy+bx-3by\\ =x\left(ax+b\right)-3y\left(ax+b\right)\\ =\left(x-3y\right)\left(ax+b\right)\)
\(5x^2y+5xy^2-a^2x-a^2y\\ =5xy\left(x+y\right)-a^2\left(x+y\right)\\ =\left(5xy-a^2\right)\left(x+y\right)\)
\(2ax^3+6ax^2+6ax+18a\\ =2ax^2\left(x+3\right)+6a\left(x+3\right)\\ =2a\left(x^2+3\right)\left(x+3\right)\)
\(10xy^2-5by^2+2ax-ab\\ =5y^2\left(2x-b\right)+a\left(2x-b\right)\\ =\left(5y^2+a\right)\left(2x-b\right)\)
\(ax-bx+cx-3a+3b-3c\\ =x\left(a-b+c\right)-3\left(a-b+c\right)\\ =\left(x-3\right)\left(a-b+c\right)\)