Let $\Omega$ be a set and $\mathscr{G}$ a family of subsets of $\Omega'$; $f:\Omega \to \Omega'$ a function. First notice that
$$\mathscr{G}\subseteq \mathscr{H}:=\{A \in \sigma(\mathscr{G}):f^{-1}(A)\in \sigma(f^{-1}(\mathscr{G}))\}\subseteq \sigma(\mathscr{G})$$
It remains to show that $\mathscr{H}$ is a $\sigma$-algebra:
(1). $f^{-1}(\Omega')=\Omega \in \sigma(f^{-1}(\mathscr{G}))$;
(2). If $B \in \mathscr{H}$, then $f^{-1}(B)\in \sigma(f^{-1}(\mathscr{G}))$. So $f^{-1}(B^c)=(f^{-1}(B))^c \in \sigma(f^{-1}(\mathscr{G}))$ and $B^c \in \mathscr{H}$;
(3) If $(B_n)_{n \in \mathbb{N}}\subseteq \mathscr{H}$; $f^{-1}(\cup_nB_n)=\cup_n f^{-1}(B_n)\in \sigma(f^{-1}(\mathscr{G}))$ so $\cup_n B_n \in \mathscr{H}$.
It follows that $\mathscr{H}=\sigma(\mathscr{G})$. So $\forall A \in \sigma(\mathscr{G}),f^{-1}(A)\in \sigma(f^{-1}(\mathscr{G}))$ and therefore $f^{-1}(\sigma(\mathscr{G}))\subseteq \sigma(f^{-1}(\mathscr{G}))$.