How to determine mixing ratio to get desired percentage? Let's say I have two types of chocolate. Chocolate A contains 70% cocoa and 30% sugar. Chocolate B contains 100% cocoa and no sugar. 
How can I figure out the exact mixing ratio I need to use to combine these two chocolates into a new product that contains 90% cocoa and 10% sugar? 
 A: As one of our constraints we could use the fact that $x$ parts of chocolate $A$ plus $y$ parts of chocolate $B$ should add up to a whole. Furthermore, if a certain amount of chocolate $A$ contains $70\%$ cocoa, then exactly the same amount of chocolate $B$ will contain $100\%$ cocoa. Therefore, $70\%$ of the $x$ parts plus $100\%$ of the $y$ parts should give us $90\%$ of the entire whole. With these constrains in place, we get the following system of two equations with two unknowns:
$$\begin{cases}
x+y=1\\
0.7x+y=0.9.
\end{cases}
$$
Solving this system of equations, we get:
$$
0.7x+(1-x)=0.9\implies x=\frac{1}{3},\\
y=1-x\implies y=\frac{2}{3}.
$$
So, the sought ratio then will be (multiply the whole thing through by $3$ to get rid of those fractions):
$$
\frac{1}{3}:\frac{2}{3}\implies 3\cdot\frac{1}{3}:3\cdot\frac{2}{3}\implies 1:2.
$$
Thus, the mixing ratio you need to use to combine these two chocolates into a new product that contains $90\%$ cocoa and $10\%$ sugar is one part of chocolate $A$ and two parts of chocolate $B$.
A: Suppose we have $x$ parts of chocolate A. Then we have 0.7x cocoa and 0.3x sugar, but to get 90% cocoa we need 2.7x cocoa. This obviously means that we need 2x parts of chocolate B, so the answer is that the A:B ratio is $1:2$
