Artificial intelligent assistant

How to factor the trinomial : $ xy-x+y-1$? How to factor the trinomial : $ xy-x+y-1$ ? The factorization is $(x+1)(y-1) $ but I don't where it comes from.

$$xy-x+y-1=\color{green}{x}\cdot\color{red}{(y-1)}\color{green}{+1}\cdot\color{red}{(y-1)}=\color{green}{(x+1)}\color{red}{(y-1)}$$ Or $$xy-x+y-1=xy+y-x-1=\color{red}{(x+1)}\cdot \color{green}{y}+\color{red}{(x+1)}\cdot\color{green}{-1}=\color{red}{(x+1)}\color{green}{(y-1)}$$

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy a31ed1e450a2a5c30bc34ff110e2f03a