From Rudin Real and Complex Analysis Theorem 1.12.
Suppose $M$ is a $\sigma$-algebra in $X$, and $Y$ is a topological space. let $f$ map $X$ into $Y$.
If $\Omega$ is the collection of all sets $E \subset Y$ such that $f^{-1}(E) \in M$, then $\Omega$ is a $\sigma$-algebra in $Y$.
Proof: follows from the relations $$f^{-1}(Y) = X$$
$$f^{-1}(Y-A) = X - f^{-1}(A)$$
$$f^{-1}(A_1 \cup A_2 \cup \ ... ) = f^{-1}(A_1) \cup f^{-1}(A_2) \cup \ ...$$
I tried to fill in the details.
For $\Omega$ to be a $\sigma$-algebra it needs to contain $Y$ and $\emptyset$.
$\Omega$ contains $Y$ because $ f^{-1}(Y) = X$ and $X \in M$.
$\Omega$ contains $\emptyset$ because $ f^{-1}(\emptyset) = \emptyset$ and $\emptyset \in M$.
Moreover $\Omega$ needs to be closed under complements and under countable unions.
Let $A$ be any set $\in$ Y. Then these two statements hold
$$f^{-1}(Y-A) = X - f^{-1}(A)$$ $$f^{-1}(A_1 \cup A_2 \cup \ ... ) = f^{-1}(A_1) \cup f^{-1}(A_2) \cup \ ...$$
So we see that all the sets that form $\Omega$ are of the tipe $Y -(A_1 \cup A_2 \cup \ ... )$ . Where $A_1, A_2 ...$ are all the sets whose preimage is in $M$.
$\Omega$ is then closed under countable unions because taking any union $Y -(A_1 \cup A_2 \cup \ ... ) \cup Y -(A_{n} \cup A_{k} \cup \ ... )$ reduces to $Y -(A_1 \cup A_2 \cup A_n \cup A_k \cup \ ... )$ that is still in $\Omega$.
Now for $\Omega$ closed under complement.
Take any set of $\Omega$, they are of the form $Y-A$, the complement is
$$(Y-A)^c = (A^c \cap Y)^c = (A \cup \emptyset) = A$$
where the second equality is demorgans law.
And $A \in \Omega$ because it can be written as $Y-(Y-A)$ and this is the form the sets of $\Omega$ are in.