Suppose that $f:X\longrightarrow Y$ is continuous. Prove that if $W$ is an open subset of $Y$ then the set $\{x\in X: f(x)\in W\}$ is an open subset of $X$.
$\textbf{Proof:}$ Assume $f:X\longrightarrow Y$ is continuous and let $W\subset Y$ be open.
Consider the set $G=\{x\in X: f(x)\in W\}$.
If $G=\emptyset$ then $G$ is clearly open in $X$ and we are done.
Otherwise let $G\neq\emptyset$ and consider $x\in G$.
Since $f:X\longrightarrow Y$ is continuous and $f(x)\in W$, $W$ is open.
Thus $f^{-1}(W)$ is open in $X$.
Hence $G=f^{-1}(W)\in X$.
Then $G\subset X$.
Thus $G$ is an open subset in $X$.
Therefore if $f:X\longrightarrow Y$ is continuous and $W$ is an open subset of $Y$, then the set $\{x\in X: f(x)\in W$ is an open subset of $X$.
Just wondering if I did this right or if I can improve on something. Please let me know of any mistakes or clarifications that I need to make. Thanks.