My question arises from the combination of both following theorems:
Theorem 1: Every open set is a continuous image of a closed set. That is, for every open set $A\subseteq \mathbb{R}^m$ there is a closed set $C\subseteq \mathbb{R}^n$ and a continuous function $f\colon \mathbb{R}^n \to \mathbb{R}^m$ such that $f\left( C \right) = A$
Theorem 2: A function is continuous iff it's preimage on every open set is open. That is, $f\colon \mathbb{R}^n \to \mathbb{R}^m$ is continious iff $f^{-1}\left( A \right)$ is open for every open set $A\subseteq \mathbb{R}^m$
Let $A\subseteq \mathbb{R}^m$ be an open set. From Theorem 1 we know that there is a closed set $C\subseteq \mathbb{R}^n$ and a continuous function $f\colon \mathbb{R}^n \to \mathbb{R}^m$ such that $f\left( C \right) = A$ .
We now have a continuous function $f$ and an open set $A\subseteq \mathbb{R}^m$ , so by Theorem 2 it's preimage $f^{-1}\left( A \right)$ has to be open. But $f^{-1}\left( A \right)=C$ is a closed set.
What am I missing here?
Just because $f(C)=A$ does not mean that $f^{-1}(A) = C$. You only conclude that $f^{-1}(A) \supset C$, but the preimage could be larger.