Image of Interval by Continuous Function is Interval/Proof 2

Theorem
Let $I$ be a real interval.

Let $f: I \to \R$ be a continuous real function.

Then the image of $f$ is a real interval.

Proof
As before, let $J$ be the image of $f$.

By Subset of Real Numbers is Interval iff Connected we need to show that $J$ is connected (and hence an interval).

Suppose not.

Then there exists a separation $S \mid T$ of $J$.

Define $A = f^{-1}(S)$ and $B = f^{-1}(T)$. $A$ and $B$ are both non-empty.

Because $f$ is continuous, by Continuous iff inverse image of any open set is open we must have $A$ and $B$ open.

Now, $A \cap B = f^{-1}(S) \cap f^{-1}(T) = f^{-1}(S \cap T) = \varnothing$, because $S \mid T$ is a separation.

Also, $A \cup B = f^{-1}(S) \cup f^{-1}(T) = f^{-1}(S \cup T) = f^{-1}(J) = I$ ($S \mid T$ is a separation of $J$).

Hence $A \mid B$ is a separation of $I$. $I$ can certainly not be an interval (because it is not connected).

This is a contradiction. Thus $J$ must be an interval.