Calculate the ratio of two drinks in order to have a specific ratio of two common ingredients Every oil contains different quantities of omega3 and omega6. I would like to mix two oils so that the ratio omega6/omega3 is the one I want.
For example, this are two oils:
In 100 grams
           Omega6         Omega3 
---------------------------------
FLAXSEED    51 grams       7 grams
SOYBEAN     14 grams      57 grams

I want for example a ratio omega6/omega3 of 2.
What formula should I apply that tell me the flaxseed/soybean ratio to use, in order to eat omega6/omega3 in the proper ratio?
 A: Say you eat one unit of soybean and $x$ units of flaxseed.  You get $14+51x$ Omega6's and $57+7x$ Omega3's.  You are asking that $\frac {14+51x}{57+7x}=2$
A: Let the numbers in the first column of your table be called $p_1= 51$ and $p_2 = 7$. 
Let $k$ be the ratio you want. 
For a mix that's $s$ of the first item and $1-s$ of the second (if $s = .25$, that means 25% flaxseed and 75% soybean), you want to have
$$
(1-s) p_1 + s p_2 = k ((1-s) q_1 + s q_2)
$$
So we solve this for $s$: 
\begin{align}
(1-s) p_1 + s p_2 &= k ((1-s) q_1 + s q_2)\\
p_1-s p_1 + s p_2 &= k (q_1 -sq_1 + s q_2)\\
p_1- kq_1  - s p_1 + s p_2 &= -skq_1 + s k q_2\\
p_1- kq_1  - s(p_1 - p_2) &= -sk(q_1 - q_2)\\
p_1- kq_1  &=  s(p_1 - p_2) -sk(q_1 - q_2)\\
p_1- kq_1  &=  s[(p_1 - p_2) -k(q_1 - q_2)]\\
\frac{p_1- kq_1}{(p_1 - p_2) -k(q_1 - q_2)}  &=  s
\end{align}
And that's your formula. 
A: This is a system of two equations in three unknowns:
$$51F+14S=2C \\
7F+57S=C $$
For each fixed $ C $ this is two linear equations in two unknowns, which can be solved for instance by Gaussian elimination. Then pick out your $ C$ of choice.
