Alright so think of it this way. You want the number of hamburger patties to equal the number of rolls with as little packages as possible.
# of Packages # per package total #
Patties 1 x 6 = 6
Rolls 1 x 8 = 8
As you see above, the total number of patties and rolls is related to the product of the number of packages and the number per package.
Therefore to answer this problem, just find the least common multiple of 6 and 8:
Multiples of 6: 6, 12, 18, 24, 36...
Multiples of 8: 8, 16, 24, 32, 40....
24 is the least common multiple. To get to 24, you multiply 6 by 4 and 8 by 3. Therefore, you need 4 packages of 6 hamburgers, and 3 packages of 8 rolls.
This is confirmed in the table below:
# of Packages # per package total #
Patties 4 x 6 = 24
Rolls 3 x 8 = 24