Consider the following short example of transformations.

Let the joint density of be given by the unit square, i.e.

Then the Cumulative Distribution Function of is given by:

I understand of course why the CDF is 0 and 1 but for the 2 cases in the middle I have been struggling to understand why we partition the CDF like that. In general what is the intuition behind the above result? I am very confused so any help is greatly appreciated, thanks.