Answer:
smallest: 8x -3 = 4; 1y +9 = 2. total = -49/8
largest: 1x -9 = 8; 2y +3 = 7. total = 19
Step-by-step explanation:
If we use variables to represent the box contents, we can write ...
ax -b = c
dy +e = f
Then the values of x and y are ...
x = (c +b)/a
y = (f -e)/d
For positive integer values of the variables, x will always be positive, and y may or may not be negative.
Smallest sum
For the sum to be the smallest, we must have x be as small as possible and the ratio (f-e)/d be as negative as possible.
x will be small for large 'a' and for (c+b) small. For y to be as negative as possible, we want 'd' and 'f' small and 'e' large. Best results are obtained for
8x -3 = 4 ⇒ x = 7/8
1y +9 = 2 ⇒ y = -7
For these coefficients, the sum is -6 1/8 = -49/8.
(note that the values of 'b' and 'c' can be swapped with no net effect)
Largest sum
For the sum to be the largest, we must have x as large as possible: (b+c) large and 'a' small. At the same time we must have y be positive and as large as possible: (f-e) positive and large, 'd' small. Best results are obtained for
1x -9 = 8 ⇒ x = 17
2y +3 = 7 ⇒ y = 2
For these coefficients, the sum is 19. Again, 'b' and 'c' can be swapped with no effect.
_____
Additional comment
These extreme values are verified by examination of the 60,480 possible permutations of the coefficients.