2x^2+xy-y^2-4x+5y-6
=(2x-y)(x+y)-4x+5y-6
=(2x-y)(x+y)+(2x+2y)-6x+3y-6
=(2x-y)(x+y)+2(x+y)-6x+3y-6
=(x+y)(2x-y+2)-3(2x-y+2)
=(x+y-3)(2x-y+2)
2x^2+xy-y^2-4x+5y-6
=(2x-y)(x+y)-4x+5y-6
=(2x-y)(x+y)+(2x+2y)-6x+3y-6
=(2x-y)(x+y)+2(x+y)-6x+3y-6
=(x+y)(2x-y+2)-3(2x-y+2)
=(x+y-3)(2x-y+2)