Lets consider that $f$ is continuous function and $O$ is an open set.
Can we assume that $f^{-1}(O)$ is also open?
If so why?
Lets consider that $f$ is continuous function and $O$ is an open set.
Can we assume that $f^{-1}(O)$ is also open?
If so why?
As has been mentioned, if $f$ is a function between general topological spaces, this property is usually taken to be the definition of $f$ being "continuous", and so there is nothing to prove.
However, if $f$ goes between metric spaces in particular, such as $\mathbb R\to \mathbb R$, "continuous" may be defined by an $\varepsilon$-$\delta$ definition like in real analysis, in which case the openness of $f^{-1}(O)$ is something that needs an actual proof.
In this case we want to show that every $x\in f^{-1}(O)$ is an interior point. What we know is that $f(x)\in O$ and $O$ is open, so there is some $\delta>0$ such that $B_\delta(f(x))\subseteq O$. The $\varepsilon$-$\delta$ definition of continuity then gives us an $\varepsilon>0$ such that $f(B_\varepsilon(x))\subseteq B_\delta(f(x)) \subseteq O$.
But then $B_\varepsilon(x)\subseteq f^{-1}(O)$, which means that $x$ is an interior point of $f^{-1}(O)$. Because $x\in f^{-1}(O)$ was arbitrary, $f^{-1}(O)$ is therefore open.
By definition, if $\mathrm{f} : X \to Y$ is continuous then, for any open set $U \subseteq Y$, the pre-image
$$\mathrm{f}^{-1}(U) := \{x \in X : \mathrm{f}(x)\in U\}$$ is an open subset of $X$. The definition of continuous is that the pre-image of all open sets is open.