x^2-3xy-10y^2+x+9y-2=(x+2y)(x-5y)+2x+4y-x+5y-2=(x+2y)(x-5y)+2(x+2y)-(x-5y+2)=(x+2y)(x-5y+2)-(x-5y+2)=(x+2y-1)(x-5y+2)
=(x-5y)(x+2y)+x+9y-2=(x-5y+2)(x+2y-1)