\(x^4+x^3+x^2-1=x^3\left(x+1\right)+\left(x-1\right)\left(x+1\right)=\left(x+1\right)\left(x^3+x-1\right)\)
\(x^2y^2-x^2-y^2+1=\left(x^2y^2-x^2\right)-\left(y^2-1\right)=x^2\left(y^2-1\right)-\left(y^2-1\right)=\left(x^2-1\right)\left(y^2-1\right)=\left(x-1\right)\left(x+1\right)\left(y-1\right)\left(y+1\right)\)