1) First factor the numerator and denominator which gives you (x+4)(x-2)/(x+8)(x-2). The (x+2) in the numerator and denominator cancel each other out so final result is (x+4)/(x+8) for all x’s except 2 and -8 as these values make the denominator 0
2) When you divide by a fraction you flip the fraction and multiply so this gives you
(x^2-9)(x^+6x+8)/ (x^+x-2)(x^2+x-12). Now factor all the expressions to get
(x+3)(x-3)(x+4)(x+2)/ (x+2)(x-1)(x+4)(x-3) which reduces to (x+3)/(x-1) for all x’s except 1,-2,3 and -4 as these will make the denominator equal to 0 at some point in the calculation