I am not confident in my proof for the problem below. Can someone please help solve this? Thanks! $\def\x{{\mathbf x}} \def\C{{\mathcal C}} \def\R{{\mathbb R}} \def\f{{\mathbf f}}$
Let $\f\colon D\to \R^m$ where $D$ is compact be one-to-one, and assume that $\f\in\C(D)$. Prove that if $E\subseteq D$ is relatively open in $D$ then $\f(E)$ is relatively open in $\f(D)$. The result will follow from the proof of the Open Mapping Theorem,
$\textbf{Solution:}$ Let $\f\colon D\to \R^m$, where $D$ is compact, be one-to-one. Since $\f \in \C(D)$, i.e. $\f$ is continuous and we know that the continuous image of a compact set is compact. Then it follows that $\f(D)$ is compact set as $\f$ is one-to-one which means $\f$ is a bijective map. Thus, $\f$ is invertible so $\f^{-1}$ is also continuous and a bijective map on the compact set $\f(D)\subseteq \R^m$. Since, for every continuous function, the inverse image of open sets is open. So, we define a map $g$ and show that $g=\f^{-1}\colon \f(D)\to D.$ Now, let $E\subseteq D$ be an open set. So $g^{-1}(E) = (\f^{-1})^{-1}E = \f(E)$ as $g$ and $\f$ are bijective. Then $g^{-1}(E)$ is open which means $\f(E)$ is open in $\f(D).$ Thus, $\f$ is an open map.
Your proof is correct, but we can simplify the proof once more. I assume that $D$ is a subset of $\mathbb{R}^m$.
If $E$ is open in $D$, then $D-E$ is closed, so $D-E$ is compact. As you mentioned, $\mathbf{f}[D-E]$ is compact, so it is closed in $\mathbb{R}^m$ and in $\mathbf{f}[D]$.
As $\mathbf{f}$ is one-to-one, $\mathbf{f}[D-E]=\mathbf{f}[D]-\mathbf{f}[E]$. Therefore, $\mathbf{f}[E]$ is open in $\mathbf{f}[D]$.