(X^2-1)/(x-1) = (x+1)(x-1)/(x-1) = x+1.

If you then subtract your original number, x, you are left with 1. The reason this doesn't work with 1 is that you would have 1-1=0 in the denominator and you cannot divide by zero.
This uses the skill of simplifying rational expressions by using the difference of squares formula (x squared minus y squared = (x+y) (x-y), in this case x squared minus 1 squared = (x+1) (x-1) and then noticing that you have x-1 in both the numerator and the denominator and cancelling them out.