First of all, a good example of $f(x)$ that works for any union $X$ would be $f(x)= x+1$.
Now consider the values of $f(x)-x$ on the two endpoints of each interval. For each interval these values must be non-zero (otherwise $f(x) = x$ on that endpoint). By the intermediate value theorem they must have the same sign on the two endpoints of the interval. And in fact, $f(x)-x$ must be of that same sign throughout the interval, otherwise the IVT tells you that $f(x)-x = 0$ somewhere between the different-sign points.
So for each interval $I_n$ we have a function which is always positive (or always negative) and since this is a closed interval there is a minimum (or for the negative case, a maximum) value of $f(x)-x$ on $I_n$. Note that the fact that the function is continuous on a closed interval is critical here; consider the function $g(x)=x + x^2$ on the open interval $(0,1)$ -- $g(x)-x$ has no minimum
So now taking the set of the absolute values of all those minima and maxima, we have a finite set of numbers, all of which are positive. That set must have a positive minimum (now you know why we needed the word "finite" in the statement of the theorem). And that minimum is the largest $\epsilon$ that works for the theorem.