Hot dogs
We have that if we buy a certain number packages of Hot dogs, the number of hot dogs we will have will be:
for 1 package: 10 hot dogs (10 x 1 = 10)
for 2 packages: 20 hot dogs (10 x 2 = 20)
for 3 packages: 30 hot dogs (10 x 3 = 30)
for 4 packages: 40 hot dogs (10 x 4 = 40)
Then, we have that the number of hot dogs are:
10, 20, 30, 40, 50 ....
Multiples of 10.
Hot dog buns
Similarly, for the hot dog buns:
for 1 package: 8 hot dogs (8 x 1 = 8)
for 2 packages: 16 hot dogs (8 x 2 = 16)
for 3 packages: 24 hot dogs (8 x 3 = 24)
for 4 packages: 32 hot dogs (8 x 4 = 32)
for 5 packages: 40 hot dogs (8 x 5 = 40)
Then, we have that the number of hot dogs buns are:
8, 16, 24, 32, 40, 48....
Multiples of 8.
Number of packages for the picnic
We want the same amount of hot dogs and hot dog buns. This means that we want to find the least common multiples of 10 and 8. If we list them, we will have
10, 20, 30, 40, 50 ....
8, 16, 24, 32, 40....
We can see that the least common multiple is 40.
We obtain 40 hotdogs buying 4 packages of it
We obtain 40 hot dog buns buying 5 packages of it.
Answer: 4 of hot dogs and 5 of hot dog buns