A question on conditional probability (Cambridge Admissions Exam) I was solving the following problem

and I got to part (b). I thought of approaching this the following way:
There are two types of cartons, one with a 60 per cent probability of being selected and the other with 40 per cent. I split it intwo scenarios and I calculated each of the conditional probabilities and then added them together (alongside with the probability of each carton being selected). Here is what I have done:

*

*First consider the case where he carton is of skimmed milk.

$$P(X>500 | X<505)= \frac{P(500 < X <505)}{P(X<505)}=\frac{b-\frac{1}{2}}{b}=\frac{2b-1}{2b}$$


*Case for full-fat milk

$$P(X>500 | X<505)= \frac{P(500 < X <505)}{P(X<505)}=\frac{b-a}{a}$$
Thus the total probability must be
$$=\frac{6}{10} \frac{2b-1}{2b} + \frac{4}{10} \frac{b-a}{a} $$
However, this is wrong according to the markscheme given here:

My question: Why is it wrong to consider the different cases separately for part (i)?
 A: Sorry for attaching an image. I am fairly new to MSE and dont know any formatting as of now.
Coming to the answer its just because the probability of picking skimmed milk given that carton contains less than 505 ml is not 0.6 and similarly not 0.4 for full fat milk. Those probabilities should be calculated considering that there is less than 505 ml in the carton.
Expressions
A: The error in your argument is that you are not considering the fact that "60% of the cartons it sells contain skimmed milk, and the rest contain full-fat milk".
With this fact we consider
$$X=\mbox{"Volume of skimmed milk in a carton",} \qquad \mbox{with }\mu_{X}=500,\:\:\sigma_{X}=10.$$
$$Y=\mbox{"Volume of full-fat milk in a carton",} \qquad \mbox{with }\mu_{Y}=495,\:\:\sigma_{Y}=10.$$
$$R\sim\mathrm{Bernoulli}(p=0.4), \quad \mbox{that is, }\mathbb{P}(R=-1)=0.6,\:\:\mathbb{P}(R=1)=0.4.$$
where both $X$ and $Y$ satisfy the relationships for $a$ and $b$ established at the beginning of the exercise and $R$ is independent of $X$ and $Y$.
Therefore we define
$$Z=\mathbf{1}_{\{R=-1\}}X+\mathbf{1}_{\{R=1\}}Y.$$
Note that $Z$ is the volume of milk in a carton. It is clear that $Z$ is a continuous random variable. So, it all comes down to calculating the following probability
\begin{align}
\mathbb{P}(Z>500|Z<505) &= \frac{\mathbb{P}(500<Z<505)}{\mathbb{P}(Z<500)}\\
&= \frac{\mathbb{P}(R=-1)\mathbb{P}(500<X<505)+\mathbb{P}(R=1)\mathbb{P}(500<Y<505)}{\mathbb{P}(R=-1)\mathbb{P}(X<505)+\mathbb{P}(R=1)\mathbb{P}(Y<505)} \\
&= \frac{0.6\mathbb{P}(\mu_{X}<X<\mu_{X}+\frac{1}{2}\sigma_{X})+0.4\mathbb{P}(\mu_{Y}+\frac{1}{2}\sigma_{Y}<Y<\mu_{Y}+\sigma_{Y})}{0.6\mathbb{P}(X<\mu_{X}+\frac{1}{2}\sigma_{X})+0.4\mathbb{P}(Y<\mu_{Y}+\sigma_{Y})} \\
&= \frac{0.6(\mathbb{P}(X<\mu_{X}+\frac{1}{2}\sigma_{X})-\mathbb{P}(\mu_{X}\leq X))+0.4(\mathbb{P}(Y<\mu_{Y}+\sigma_{Y})-\mathbb{P}(\mu_{Y}+\frac{1}{2}\sigma_{Y}\leq Y))}{0.6b+0.4b} \\
&=\frac{0.6(b-\frac{1}{2})+0.4(a-b)}{b}\\
&=\frac{4a+2b-3}{10b}.
\end{align}
For part (ii) of (b) what they are giving you are the following two equations.
\begin{align}
0.7&=\mathbb{P}(Z\geq 505)\\
\frac{1}{3}&=\mathbb{P}(R=1|Z\geq 495)
\end{align}
From these two equations, you must solve for $a$ and $b$, this is easy using the law of total probability in the same way as used in the previous calculation.
Hint: The solution of (ii) of (b) is $a=\frac{3}{4}$ and $b=\frac{2}{3}$.
