[tex]\bf \begin{array}{lcclll}
x^2&+5x&-6\\
&\uparrow &\uparrow \\
&-6+1&-6\cdot 1
\end{array}\implies (x-6)(x+1)\\\\
-------------------------------\\\\
\begin{array}{lcclll}
x^2&+9x&+18\\
&\uparrow &\uparrow \\
&6+3&6\cdot 3
\end{array}\implies (x+6)(x+3)\\\\
-------------------------------\\\\
thus\implies \cfrac{x^2+5x-6}{x^2+9x+18}\implies \cfrac{(x+6)(x-1)}{(x+6)(x+3)}\implies \cfrac{x-1}{x+3}[/tex]