The intermediate step that happened is that we have (x+2)(x+2) all over (x+2)(x+5), then we have a pair of (x+2) terms cancel as the diagram indicates (see below). This is where the removable discontinuity happens. Specifically when x = -2. Plugging x = -2 into (x+2)/(x+5) produces an output, but it doesn't do the same for the original ratio of quadratics. So we must remove x = -2 from the domain.