You have 4 machines that are supposed to create 100mg chocolate bars. One of the four machines is not working correctly and is making 90mg chocolate bars. You only have 1 chance to weigh the chocolate bars of 2 of the machines. What is the mathematical equation capable of pulling this off?
I presume you need to find the defective machine?
This seems to be variant of a classic puzzle.
The solution for that is to take one bar from machine one, two from machine two etc and weight the total and consider the difference between the weight you get and the expected total of 1kg.
As to your puzzle, it is not possible to guarantee finding the defective machine in one weighing, if you are only allowed to take bars from two of the four machines.