Multiples of both 6 and 8 are multiples of 24
Using number facts
The number of coins in Tom's collection is 3 more than a multiple of 6 and also 7 more than a multiple of 8. The smallest number that satisfies both conditions is 15. The lowest common multiple of 6 and 8 is 24, so the conditions will also be met by numbers that exceed 15 by a multiple of 24, that is 39, 63, 87, etc. So when Tom puts his coins in piles of 24, 15 remain.