(x-y)²+2(y+x) =
4x²(x+2)-3x²(x+2) =(x+2)(4x²-3x²)=(x+2)x²
9(x-y)²-y²=(3(x-y))²-y²=(3x-3y-y)(3x-3y+y)=(3x-4y)(3x-2y)