The first thing to do is to collect together terms with the same denominator:
x^2/(x-1)-1/(x-1) - x^2/(x+1)+1/(x+1).
Next, combine the numerators: (x^2-1)/(x-1) - (x^2-1)/(x+1).
The denominator divides into the numerator because x^2-1=(x-1)(x+1);
x+1-(x-1)=x+1-x+1=2, so the expression simplifies to just 2.