Ben has 8 apples more than Phillip does. Tom has three eighths as many apples at Ben has. If Phillip has 40 apples, how many apples does Tom have?
Please reason step by step, and put your final answer within \boxed{}.
user