Assuming that 1 wiener and 1 bun required to sell 1 hotdog.
Given that there are 12 wieners and 8 buns in 1 packet of each.
Let m be the minimum numbers of hotdogs for no leftover wieners or buns.
So, m must be a number which is divisible by both 12 as well as 8.
The smallest number which is the common multiple of both 12 as well as 8 is the highest common factor (H.C.F.) of 12 and 8 which is 24.
So, m=24
At this pint, note that 24 is the minimum number of hotdogs that students can sell with no leftover wieners or buns. For this, they need 2 packets of wieners and 3 packets of buns.
So, 1 m hotdogs required 2 packets of wieners and 3 packets of buns
But, here the number of hotdogs is between 100 and 150.
The next possible number of hotdog wit no leftover wieners or buns is 48 which is 2m, the next will be 3m, and so on.
In fact, any multiple of m will be divisible by 12 as well as 8, so there will not be any leftover wieners or buns.
So, 24n hotdogs require 2n packets of wieners and 3n packets of buns,
where n is a counting number.
Now, find the multiple of 24 in between 100 and 150,
The first multiple is 24x5=120
So, 120 hotdogs require 2x5=10 packets of wieners and 3x5=15 packets of buns
The second multiple is 24x6=144
So, 144 hotdogs require 2x6=12 packets of wieners and 3x6=18 packets of buns
If the students want to sell more than 300 hotdogs:
The minimum number which is multiple of 24 is 24x13=312, the next number is 24x14=336, and so on
For this n=13, 14, 15, ...
So, they need to buy 2n packets of wieners and 3n packets of buns to sell 24n packets of hotdogs for no leftover.
For the minimum number of 312 hot dogs, they need to buy 2x13=26 packets of wieners and 3x12=36 packets of buns.