How do you simplify (x^3+x^2-x-1)/(x^3-x^2-x+1)?

divide both by (x-1)

get
x^2+2x+1 and x^2-1
divide both of those by (x+1)
get
x+1 and x-1
so
(x+1)/(x-1)