The function is given by the blue line. The limits of the first integral are given by the green lines. The limits of the 2nd integral are given by the red lines. And the limits of the integral we're interested in happen to be involved in the first two!
Can you see it now?