Path connected implies connected I am learning point set topology, and I want to be able to prove that a path connected set is also a connected set. I found many results by searching, but none of which I understand fully. One stands out from topospaces wiki:

Given: A path-connected topological space $X$
To prove: $X$ is connected.
Proof: We do this proof by contradiction. Suppose $X$ is not
connected. Then, there exist nonempty disjoint open subsets $U, V \subseteq X$ such that $X=U \cup V$. Pick a point $x \in U$ and a
point $y \in V$.
By assumption, there exists a continuous function $f:[0,1] \rightarrow X$ such that $f(0)=x$ and $f(1)=y$. $\color{blue}{\text{Consider the subsets $f^{-1}(U)$ and $f^{-1}(V)$. These are disjoint in $[0,1]$ and their union is $[0,1]$}}$. By the continuity of $f$, they are both
open in $[0,1]$. Finally, since $0 \in f^{-1}(U)$ and $1 \in f^{-1}(V)$, they are both nonempty. We have thus expressed $[0,1]$ as
a union of two disjoint nonempty open subsets, a contradiction to the
fact that $[0,1]$ is connected. This completes the proof.

I understand all parts of this proof except for the highlighted blue part. I do not know why the inverse images of two open disjoint sets in $X$ are also disjoint in $[0,1]$, and union to equal it. Is there some general property inverse images which means that inverse images of disjoint open sets are also disjoint? If so, why? (i.e. is there a proof?)
 A: 
$\color{blue}{\text{Consider the subsets $f^{-1}(U)$ and $f^{-1}(V)$. These are disjoint in $[0,1]$ and their union is $[0,1]$}}$

We prove the text in blue, where $U$ and $V$ are disjoint, $X=U\cup V$, and $f$ is a continuous function $f:[0,1] \rightarrow X$ such that $f(0)=x$ and $f(1)=y$.

First we show that $f^{-1}(A\cup B)=f^{-1}(A)\cup f^{-1}(B)$, and $f^{-1}(A\cap B)=f^{-1}(A)\cap f^{-1}(B)$, as per a comment by Thorgott. We do this using the definitions of inverse images, set union, set intersection, in set builder notation.

*

*The union of two sets $A\cup B$ is $\{x|x\in A\text{ or }x\in B\}$.


*The intersection of two sets $A\cap B$ is $\{x|x\in A\text{ and }x\in B\}$.


*The inverse image $f^{-1}(A)$ is defined to be $\{x\in X|f(x)\in A\}$. Inverse images are defined for all functions, invertible or otherwise.
We then have:
\begin{align}
z\in f^{-1}(A\cup B) &\iff f(z)\in A\cup B\\
&\iff f(z)\in A\text{ or }f(z)\in B\\
&\iff z\in f^{-1}(A)\text{ or }z\in f^{-1}(B)\\
&\iff z\in f^{-1}(A)\cup f^{-1}(B)\\
\\
\therefore~f^{-1}(A\cup B)=&f^{-1}(A)\cup f^{-1}(B)
\end{align}
\begin{align}
z\in f^{-1}(A\cap B) &\iff f(z)\in A\cap B\\
&\iff f(z)\in A\text{ and }f(z)\in B\\
&\iff z\in f^{-1}(A)\text{ and }z\in f^{-1}(B)\\
&\iff z\in f^{-1}(A)\cap f^{-1}(B)\\
\\
\therefore~f^{-1}(A\cap B)=&f^{-1}(A)\cap f^{-1}(B)
\end{align}

It remains to be shown that the subsets $f^{-1}(U)$ and $f^{-1}(V)$. These are disjoint in $[0,1]$ and their union is $[0,1]$. We use the fact that $U$ and $V$ are disjoint, and that $f$ maps $[0,1]$ to $X=U\cup V$ to demonstrate this.
\begin{align}
f^{-1}(U)\cup f^{-1}(V)&=f^{-1}(U\cup V)\\
&=f^{-1}(X)\\
&=[0,1]
\end{align}
\begin{align}
f^{-1}(U)\cap f^{-1}(V)&=f^{-1}(U\cap V)\\
&=f^{-1}(\emptyset)\\
&=\{x\in [0,1]|f(x)\in \emptyset\}\\
&=\emptyset\\
\end{align}
$\therefore$ $f^{-1}(U)$ and $f^{-1}(V)$ are disjoint, and their union is equal to $[0,1]$.
