Suppose the concentrations (or prices) of the three solutions are a, b, and c respectively, and the mean concentration (or price) of the mixture is m.
First, take solutions A and B.
Using alligation:
$$A:B = (b-m):(m-a)$$
Let
$$A:B = x:y$$
Now take solutions B and C.
Using alligation:
$$B:C = (c-m):(m-b)$$
Let
$$B:C = p:q$$
The ratio in which three can be mixed is $$x:(y+p):q$$