Revisit the following discussion:
Prove that the inverse image of an open set is open
Obviously, the above discussion is based on Euclidean space (which is also a metric space, so the proof is based on the open ball). Can we say the following:
Let $X,Y$ be any two topological spaces,
$f: X \rightarrow Y$ be a continuous function. The inverse image of an open set is open under $f$.
Can this famous theorem apply to any topological space? for example, Zariski space?
Actually, that's the usual way of defining the meaning of “continuous function” in Topology textbooks. So, it's not a theorem at all; it's a definition.
Of course, you can also say that a function $f\colon X\longrightarrow Y$ is continuous if, for each $x\in X$ and each neighborhood $V$ of $f(x)$, $f^{-1}(V)$ is a neighborhood of $x$. If you adopt this as the definition of “continuous function” then, yes, your statement becomes a theorem which has to be proved. It's quite easy.
And, yes, in particular this applies to the Zarisky topology.