William W. answered 03/03/19
Math and science made easy - learn from a retired engineer
To be able to put the marbles into bags of 3 or 8 means that 3 and 8 must be factors of the total number of marbles. That means the total must be some number of 3's multiplied by some number of 8's. But if the total has more than one 3 as a factor, it will also have 9 as a factor (because 3 x 3 = 9), so since we do not want to have the total evenly divisible by 9, there must only have one 3 as a factor of the total.
So start with 3 x 8 = 24. That would have 6 left over when divided by 9 (9 x 2 = 18 and 24 - 18 = 6)
Next, look at 3 x 8 x 8 = 192. That would have 3 left over when divided by 9 (9 x 21 = 189 and 192 - 189 = 3) so that's the answer.