how to solve (x ^2-1)/(x+1)-x ho can I solve to a -1. Please help

(x^2-1)/(x+1) -x

= [(x+1)*(x-1)]/(x+1) -x
= (x-1) -x = -1