(a+2)/(a-5) ÷ (a+1)/(a²-8a+15) =
Note : (a²-8a+15) = (a-3) (a-5)
∴ (a+2)/(a-5) ÷ (a+1)/(a²-8a+15) = [(a+2)/(a-5)] ÷ [(a+1)/(a-3) (a-5)] =
= [(a+2)/(a-5)] * [(a-3) (a-5)/(a+1)] = (a+2)(a-3)/(a+1)
not: the divide sign (÷) becomes (*)
and (a+1)/(a²-8a+15) becomes (a²-8a+15)/(a+1)
The original divisor of
{(a+2)/(a-5) ÷ (a+1)/(a²-8a+15)} = [(a+2)/(a-5)] * [(a-3) (a-5)/(a+1)]
If a = 1 or a = 5 that expression would be undefined, so we will restrict those values