Question on ratio Substance A has butter to sugar ratio of 8:1 and substance B has butter to sugar ratio of 175:1. The whole of A is combined with part of B to get substance C of Butter to sugar ratio of 30:1. What ratio of substance B was used?
 A: I'll look at doing alligation:
$$\begin{array}{c|c|c}\hspace{-1px}11\;\frac{1}{9}&&2\frac{897}{1364}\\\hline&3\frac{7}{31}&\\\hline \frac{25}{44}&&7\frac{247}{279}\end{array}$$
all numbers in the left columns are percentages for the mixtures (8:1 has 9 parts total, 175:1 has 176 parts total). middle column has the wanted ratio ( 30:1 has 31 parts). the last column has parts in the final mixture, turning them to full integers we get them equivalent to 32625 and 96800 reducing to 1305 and 3872 which then works to produce 5177 parts of $\frac{1}{31}$ which is the ratio $30:1$ for the two ingredients.
Probably not the way your teacher wants it done, but it works via subtraction along diagonals, and converting to same denominator fractions on  the right then reduction of numerators. Thankfully, I had a calculator to check my work.
technical notes: Assumes percentages are in same units or equivalent units. Doesn't take into account contraction of by-product mixture.
A: A has $8x$ butter to $1x$ sugar.
B has $175y$ butter to $1y$ sugar.
C has $30z$ butter to $1z$ sugar.
So 
\begin{align}
   8x + 175y &= 30z \\
   1x + 1y &= 1z \\
\hline
   8x + 175y &= 30z \\
   8x + 8y &= 8z \\
\hline
   167y &= 22z \\
   y &= \dfrac{2}{17}z \\
   x &= \dfrac{15}{17}z
\end{align}
We could say
$$\dfrac{15}{17}A + \dfrac{2}{17}B = C$$
To use the whole of $A$, we need to multiply through by $\dfrac{17}{15}$.
$$1A + \dfrac{2}{15}B = \dfrac{17}{15}C$$
So $\dfrac{2}{15}$ of substance $B$ was used.
