I havn't used this site in a long time but I remember this math page being useful for basic math problems which I found frustrating. This problem is insanly stupid but I need it to write a program in order to maximise the yield. It's kinda like balancing heat and pressure in the production of ammonia which I forgot how to do because of bad memory + bad chem student.
So just to make things easier I will simplify the question, and use buttons to represent the variables.
So lets say 1 package(1) contains 75 blue buttons and 100 red buttons and another package(2) contains 125 blue buttons and 50 red buttons.
Now the ratio of of blue:red for the packages are:
3:4 - (1)
5:2 - (2)
Now I want to figure out some method for balancing the ratios of the packages so the ratio of blue buttons to red buttons is 1:1.
So inception with ratios