1. There's so much wrong with the suggested solution that it's hard to pinpoint the exact error. The "logic" is inconsistent - why do the [tex]x[/tex] and constant term stay in the denominator but the [tex]x^2[/tex] term does not?
What should be done is factorization in the numerator and denominator:
[tex]x^2 + 2x - 8 = (x + 4) (x - 2)[/tex]
[tex]x^2 + 6x - 16 = (x + 8) (x - 2)[/tex]
Then in the quotient, the factors of [tex]x-2[/tex] cancel so that
[tex]\dfrac{x^2+2x-8}{x^2+6x-16} = \dfrac{(x+4)(x-2)}{(x+8)(x-2)} = \boxed{\dfrac{x+4}{x+8}}[/tex]
2. Use the same strategy: factorize everything everything you can, then cancel anything you can.
[tex]x^2 - 9 = (x-3) (x+3)[/tex]
[tex]x^2+x-2 = (x+2)(x-1)[/tex]
[tex]x^2+x-12 = (x+4)(x-3)[/tex]
[tex]x^2+6x+8 = (x+4)(x+2)[/tex]
Then using the algebraic properties of multiplication/division, we have
[tex]\dfrac{x^2-9}{x^2+x-2} \div \dfrac{x^2+x-12}{x^2+6x+8} = \dfrac{x^2-9}{x^2+x-2} \times \dfrac{x^2+6x+8}{x^2+x-12} \\\\ ~~~~~~~~= \dfrac{(x-3)(x+3)(x+4)(x+2)}{(x+2)(x-1)(x+4)(x-3)} \\\\ ~~~~~~~~= \boxed{\dfrac{x+3}{x-1}}[/tex]