I am working on a problem that goes as follow:
Your driving time to work is between 30 and 45 minutes if the day is sunny, and between 40 and 60 minutes if the day is rainy, with all times being equally likely. A day is sunny with probability 2/3, and rainy with probability 1/3. Find the mean of your driving time to work.
Letting $X$ the time it takes to drive to work, $S$ the event that it is sunny, and $R$ the event that it is rainy, I deduced that $$X|S\sim \text{unif}(30,45)$$ $$X|R\sim \text{unif}(40,60)$$
Hence, $$\mathbb{E}(X|S)=\frac{30+45}{2}=\frac{75}{2}$$ $$\mathbb{E}(X|R)=\frac{40+60}{2}=50$$
I know that I can use the law of total expectation to find $\mathbb{E}(X)$ when S and R are disjoint, but since they overlap for $x\in[40,45]$ I am unsure how to go about this. So my question is, is $$\mathbb{E}(X)=\mathbb{E}(X|S)\cdot P(S)+\mathbb{E}(X|R)\cdot P(R)$$ still valid?
I think you misunderstood what it means for $S$ and $R$ to be disjoint. All this means is that $S$ and $R$ can't happen simultaneously - either it is sunny or it is raining, but not both. Here $S$ and $R$ are disjoint, so you are fine.
This has nothing to do with the possible values of $X$ when $S$ happens and when $R$ happens. In fact whether $S$ and $R$ are disjoint does not depend on $X$ at all.