I'm having issue understanding the process of defining a domain while attempting to divide rational expressions:
$$ \frac {x^2+x-6}{x^2+3x-10} : \frac {x+3}{x-5} $$
We can factor to the form
$$ \frac {(x+3)(x-2)}{(x+5)(x-2)} : \frac {(x+3)}{(x-5)} $$ In the textbook I follow, I was told that the expression is undefined for $\;x=-5,\; x=2,\; x=5\;$ and is equal to zero, when $\;x=-3.$
But when I flip the divisor: $$ \frac {(x+3)(x-2)}{(x+5)(x-2)} \times \frac {(x-5)}{(x+3)} $$
Now $\;x\;$ is undefined for $\;x=-5,\; x=2,\; x=-3\;$ and is equal to zero when $\;x=5.$
According to the textbook, after cancelling common factors the expression result is: (we can omit the $\;x=-5,\;$ as it can be deducted from the expression) : $$ \frac {(x-5)}{(x+5)},\quad x\neq5,2,-3 $$
My problem with this is that if I flip the divisor before defining domain, I receive the following $$ \frac {(x+3)(x-2)(x-5)}{(x+5)(x-2)(x+3)}$$ And now, I would define the domain as: $$x\neq-5,2,-3 $$ Therefore, my final result would be equal: $$\frac {(x-5)}{(x+5)}, \quad x\neq-5,2,-3$$
Can you explain how to approach that appropriately, please?