Divide 3n^2-n/n^2-1/n^2/n+1

You must see how confusing your expression is when rendered here.

If you mean

(3n^2-n)/(n^2-1) / n^2/(n+1)
then that is

n(3n-1)/((n-1)(n+1)) * (n+1)/n^2

Now the n and (n+1) factors cancel, and you are left with

(3n-1)/(n-1)