Factor the numerator and denominator...
(n^4-5n^2-6n^2+30)/(n^4-2n^2-5n^2+10)
[n^2(n^2-5)-6(n^2-5)]/[n^2(n^2-2)-5(n^2-2)]
[(n^2-5)(n^2-6)]/[(n^2-5)(n^2-2)] notice the (n^2-5)s cancel out
(n^2-6)/(n^2-2)
We could further factor this because each is a difference of squares to:
[(n+√6)(n-√6)]/[(n+√2)(n-√2)