I have no idea what you are asking! What in the world is "g"? Where did it come from?
I think you mean this: suppose you are to integrate
where "R" is a "type 1 region". That means that there exist some numbers, x0 and x1, such that the region's boundary can be written as two separate functions of x, y= g1(x) and y= g2(x), such that g1(x)> g2(x) for all x between x0 and x1. That allow us to treat it as an integral over the area between g1(x) and g2 so that those are the bounds on the integral.
If you are asking why they must be the bounds on the inner integral rather than the outer, the answer is simply that the double integral result must be a number, not a function either x or y. If the bounds on the outer integral were functions of x or y, then so would the result of the integration be.