to answer this question, you would need the Least Common Denominator.
6, 12, 18, 24, 30
10, 20, 30
So the LCD, Least Common Denominator, is 30.
How many packs of hot dogs did he buy?
5 packs.
How many packs of buns did he buy?
3 packs.
How many hot dogs did he buy?
30 hot dogs.
Hoped this helped,
-Anime