You are planning a cookout and plan on serving hotdogs. The hotdogs are sold in packages of eight, but the hotdog buns are sold in packages of ten. What is the smallest number of packages of each that must be bought so that there are the same number of hotdogs as buns?

This is just like find the LCM of 8 and 10 which would be 40

must buy 40/8 or 5 packages of buns ---> 40 buns
and 40/10 or 4 packages of hotdogs ----> 40 hotdogs