Doubt in Sum no 29 of Rudin 
Prove that every open open set in $R$ is the union of a countable number of disjoint intervals.

Although this question has been in stack exchange for too many times but here is my intuition to it. Can someone just suggest whether I am on the right track.
I am taking the example of the open set $(a,b)$.So I take the first segment as $(a, b-1)$ , the second segment as $[b-1,b-1/2)$ the third as $[b-1/2,b-1/3)$ and so on...My logic behind this is that $(0,1-1/n)$ covers $(0,1)$ and so $(a, b-1/n)$ covers $(a, b) $.The intervals are disjoint also and their union  is also countable. Now, my question is the hint given in rudin is to use the fact that $R$ is separable , but where do I use it, Am I making a mistake somewhere?


I am taking the example of the open set $(a,b)$.So I take the first segment as $\color{red}{(a, b-1)}$ , the second segment as $[b-1,b-1/2)$ the third as $[b-1/2,b-1/3)$ and so on...My logic behind this is that $(0,1-1/n)$ covers $(0,1)$ and so $(a, b-1/n)$
$\color{red}{ covers}$ $(a, b) $.The intervals are disjoint also and their union  is also countable. Now, my question is the hint given in rudin is to use the fact that $R$ is separable , but where do I use it, Am I making a mistake somewhere?

From what you have written, I assume you mean
$$(a,b)=(a,b-1) \cup (b-1,b-\frac{1}{2}) \cup (b-\frac{1}{2},b-\frac{1}{3}) \cup \dots $$
But there are many issues with this logic. The mistakes are
$1$-What if $a > b-1$?
$2$-Your open set need not of the form $(a,b)$. It can be of the form $\bigcup_{i\in I}(a_i,b_i)$ where $I$ can be an uncountable set as well.
$3$-Secondly, Your LHS may miss the points $\Big\{b-1,b-\frac{1}{2},b-\frac{1}{3},\dots\Big\}$ , So you cannot say that your set $(a,b)$ is covered
Now the hint can give you an easier solution. You can think about that. The hint says that there exists a countable dense set. The set of rational numbers $\mathbb{Q}$ is countable and dense in $\mathbb{R}$.
