factor the numerator and denominator of the first fraction...
(n^2-6n-4n+24)/(n^2-6n-7n+42)
(n(n-6)-4(n-6))/(n(n-6)-7(n-6))
((n-4)(n-6))/((n-7)(n-6)), note that the (n-6)s cancel out leaving:
(n-4)/(n-7) so now the equation looks like:
(n-4)/(n-7)-9/(n-7) since they now have a common denominator...
(n-4-9)/(n-7) which is
(n-13)/(n-7)