If there are 4 marbles left over each time, then we can forget about them for now.
So the question is, what is the smallest number than can be divided into 6,7 and 8?
the numbers have only one non-1 divisor in common: both 6 and 8 are divisible by 3.
so for our purposes we can "delete" one 2 and ask:
what is the smallest number than can be divided into 3,7 and 8 ?
There are no more divisors in common, so we just have to multiply them: 3*7*8=21*8=168
and the 4 marbles "extra"? We add them to this sum.
the the smallest possible number in the box is 168+4=172.