Let $f : X → Y$ be a given function, and suppose that $f^{-1}(C)$ is an open subset of $X$ whenever C is an open subset of $Y$ .
(a) Prove that $f$ is continuous on $X$.
(b) Prove that $f^{-1}(B)$ is a closed subset of $X$ whenever B is a closed subset of $Y$
(c) If $Y = \mathbb{R}$, and $f$ is continuous, and $a \in \mathbb{R}$, what kind of set is $A = \{x \in X : f(x) \leq a\}$? Justify your answer
I already solved part a, and my attempt for part (b) is:
$f^{−1}(B)$ = $(f^{−1}(B^c))^c$ ⋯ (1) ($E^c$ denoting the complement of $E$).
So if B is closed, then $B^c$ is open, $f^{−1}{(B^c)}$ is open and its complement is closed. This means $f^{−1}(B)$ is closed by (1).
But I'm finding trouble in solving part (c). Any help please?