a)x^2-y^2+5x+3y+4
=(x-y)(x+y)+4(x+y)+x-y+4
=(x+y)(x-y+4)+x-y+4
=(x+y+1)(x-y+4)
b)xy+y^2+x-y-2
=(xy+x)+(y^2-y-2)
=x(y+1)+(y-2)(y+1)
=(y+1)(x+y-2)
a)x^2-y^2+5x+3y+4
=(x-y)(x+y)+4(x+y)+x-y+4
=(x+y)(x-y+4)+x-y+4
=(x+y+1)(x-y+4)
b)xy+y^2+x-y-2
=(xy+x)+(y^2-y-2)
=x(y+1)+(y-2)(y+1)
=(y+1)(x+y-2)