In most of these questions , you are supposed to find the ratio , or any one of the values either M(mean price) , or C(C.P of cheaper) or D(C.P of dearer) where the other two values and the ratio is given.
To find that , we have the best trick for you.
When two commodities are mixed then,
$\left ( \frac{ \text{ Quantity of Cheaper }}{\text{ Quantity of dearer }} \right ) = \left ( \frac{ \text{ C.P of Dearer (d) – Mean price (m)}}{ \text{ Mean price(m) – C.P. of cheaper(c) }} \right)$
This equation can also be developed using the pictorial diagram.