Let $S\subset\mathbb{R}$ be an open set and $x\in S$. Let $T \subset S$ be the largest open interval containing $x$, then $S\setminus T$ is an open set.
My attempt:
Let $y\in S\setminus T$. Then $y \in S$ and $y \not\in T$. Since $y \in S$ and $S$ is an open set, there exists a neighborhood $I \subset S$ of $y$. We will now show that every element $z \in I$ is not in the set $T$. Otherwise if there were some element $z$ in $I$ such that $z$ is in $T$, then $T\cup I$ is a neighborhood of $z$ and so for $x$. But $T$ was the largest open interval containing $x$ (a contradiction!); thus we have that every element $z \in I$ is not in the set $T$. Thus, $I \subset S\setminus T$ and we conclude that $S\setminus T$ is an open set.
Is this proof okay or are there any counterexamples to this proposition?
Since the open intervals form a basis for the topology, an open set $S$ in $\Bbb R$ is a union of disjoint open intervals (finite intersections of open intervals are also open intervals). So which ever one $x$ is contained in, will be $T$. Then $S\setminus T$ will be the union of the remaining intervals, hence open.
So this exercise is really about what the open sets in $\Bbb R$ "look like".
Your way looks ok.