Solution
= Solution
If $f$ is <continuous>, the sets in question are preimages of the open rays $(-\infty,\lambda)$ and $(\lambda,\infty)$, so they are open. Conversely, suppose all those sets are open. For every $a<b$,
$$
f^{-1}((a,b))=\{f>a\}\cap\{f<b\}
$$
is open as the <intersection> of two open sets. Part (i) and the basis criterion of part (b) then prove \b[$f$ is <continuous>].