This question is worded very strangely and honestly I'm rather confused.
Suppose $\varnothing$ $\subsetneq$ F $\subsetneq$ $\mathbb{R}$ is closed. Then $\exists$ x$_{0}$ $\in$ F and y$_{0}$ $\in$ F$^{c}$.
We will assume that x$_{0}$<y$_{0}$ without loss of generality.
The set A:={x $\in$ F: x<y$_{0}$} is bounded above by y$_{0}$ and nonempty since x$_{0}$ $\in$ A. As such, z:= sup(A) exists.
Show z $\in$ F.
My professor mentioned that this had something to do with proving that $\varnothing$ and $\mathbb{R}$ are the only "clopen" subsets of $\mathbb{R}$, but that's not actually mentioned anywhere in the question.
If $z \in F^c$ then $z\not \in F$ and $z \not \in A$. But $z$ is $\sup A$ so for every $\epsilon$ there is a $x \in A \subset F$ so that $z-\epsilon < x \le z$ but as $x \in A$, $x \ne z$ so $z-\epsilon < x < z$.
So $z$ is a limit point of $F$. But $F$ is closed. So $z \in F$. A contradiction.
So $z\in F$.
Not sure that this anything to do with clopen sets though. At least not immediately.