The maximum the difference could be is difference between the upper bound of the first interval and the lower bound of the second. The minimum difference is the difference between the lower bound of the first and the upper bound of the second. This holds true even if the second interval is greater than the first or the intervals overlap.