X^2+XY-6Y^2-x-8Y-2
=(X+3Y)(X-2Y)+(X-2Y)-2X-6Y-2
=(X-3Y)(X-2Y)+(X-2Y)-2(X+3Y)-2
=(x-3y)(x-2y-2)+(x-2y-2)
=(x-3y+1)(x-2y-2)