10 = 5 x 2
8 = 2 x 2 x 2
The LCM OF 8 and 10 = 2 x 2 x 2 x 5 = 40
Therefore to find out how many packages of hot dogs you would have to buy you would do 40 ÷ 10 = 4.
To find out how many packages of buns you would have to buy you would do 40 ÷ 8 = 5.
So you would need 4 packages of hot dogs and 5 packages of buns.
Hope this helps :)