<s>[INST] Factoring $x^2-y^2-z^2+2yz+x+y-z$ This is a factorization problem on polynomials. I can't find a way to solve it, neither can a math program called MathWay. Help me, please.

$$x^2-y^2-z^2+2yz+x+y-z$$
My book says that the answer is $(x+y-z)(x-y+z+1)$.

 [/INST] $$\begin{align}x^2-y^2-z^2+2yz+x+y-z&=x^2-(y-z)^2+x+y-z\\&=(x+(y-z))(x-(y-z))+x+y-z\\&=(x+y-z)(x-y+z+1)\end{align}$$
</s>