Question 1:
Make paints with certain red to white ratios using paints A and B and find the least amount of cans necessary. Paint A has a red to white ratio of 1:3 and paint B has a red to white ratio of 1:7. Paint A is 1/4 red and 3/4 white and paint B is 1/8 red and 7/8 white. By mixing x cans of paint A and y cans of paint B, we get paint with a red to white ratio of (x/4+y/8) to (3x/4+7y/8) = (2x+y) to (6x+7y)
1:4
We need to find integers x and y such that (x/4+y/8)/(3x/4+7y/8)=1/4. To do that, plot (x/4+y/8)/(3x/4+7y/8)=1/4 and find the first point (x,y) in which x and y are integers. That will give you the smallest value of x+y such that (x/4+y/8)/(3x/4+7y/8)=1/4 for integers x and y.
https://www.desmos.com/calculator/ixwksx6kpb
In this example, the point is (3,2) => the solution is 3 cans of paint A and 2 cans of paint B.
1:5
To solve for 1:5, just plot (x/4+y/8)/(3x/4+7y/8)=1/5 and find the first point (x,y) in which x and y are integers.
https://www.desmos.com/calculator/shkswex1ze
For 1:5, the point is (1,2) => solution is 1 can of paint A and 2 cans of paint B.
1:6
https://www.desmos.com/calculator/zsd4bfxxdk
The first point is (1,6) => the solution is 1 can of paint A and 6 cans of paint B.
Question 2:
Now we are working with paints C and D. Paint C has a red to white ratio of 1:4 and paint D has a red to white ratio of 1:9. That means that paint C is 1/5 red and 4/5 white and paint D is 1/10 red and 9/10 white. By mixing x cans of paint C and y cans of paint D, we get paint with a red to white ratio of (x/5+y/10) to (4x/5+9y/10) = (2x+y) to (8x+9y).
1:5
We can solve these problems by using a method similar to question 1. First, plot (2x+y)/(8x+9y)=1/5. Then, find the first point (x,y) where x and y are integers.
https://www.desmos.com/calculator/g5mmhnvimc
The solution is 2 cans of paint C and 1 can of paint D.
1:6
Plot (2x+y)/(8x+9y)=1/6:
https://www.desmos.com/calculator/gaixasqwxb
The solution is 3 cans of paint C and 4 cans of paint D.
1:7
Plot (2x+y)/(8x+9y)=1/7:
https://www.desmos.com/calculator/durhq4hhxr
The solution is 1 can of paint C and 3 cans of paint D.
1:8
Plot (2x+y)/(8x+9y)=1/8:
https://www.desmos.com/calculator/s20ectccai
The solution is 1 can of paint C and 8 cans of paint D.