\(M=x^2-5x+xy-5y=\left(x+y\right)\left(x-5\right)\)
\(N=x^2-3x-2xy+y^2+3y=\left(x-y\right)\left(x-y-3\right)\)\(K=2xy+3z+6y+xz=\left(x+3\right)\left(2y+z\right)\)
M= x2-5x+xy-5y= x(x-5)+y(x-5)=(x-5)(x+y)
N= x2-3x-2xy+y2+3y=(x-y)2-3(x-y)=(x-y)(x-y-3)
K= 2xy+3z+6y+xz=2y(x+3)+z(x+3)=(x+3)(2y+z)