Here, you just want to find the LCM, or the Least Common Multiple, or the closest time when both of their numbers meet.
(If that makes any sense)
So their LCM is 24, because:
12: 12, 24
8: 8, 16, 24
And 24 is the closest number they meet at.
So it will be 24 minutes before they start filling a new box at the same time.