Answer :
[tex]\frac{x^2-8x+15}{x^2+x-12}=\frac{x^2-3x-5x+15}{x^2-3x+4x-12}=\frac{x(x-3)-5(x-3)}{x(x-3)+4(x-3)}=\frac{(x-5)(x-3)}{(x+4)(x-3)}= \\
=\boxed{\frac{x-5}{x+4}}, x \not= -4 \hbox{ and } x\not= 3[/tex]
[tex]\frac{x^{2} - 8x + 15}{x^{2} + x - 12} = \frac{x^{2} - 5x - 3x + 15}{x^{2} + 4x - 3x - 12} = \frac{(x - 3)(x - 5)}{(x - 3)(x + 4)} = \frac{x - 5}{x + 4} [/tex]