Two partners, Alice and Bob, decided to split their business profits in the ratio of their initial investments. Alice invested $15,000, and Bob invested $25,000. After some time, they decided to reinvest a portion of their profits back into the business. If their total profit was $40,000 and they reinvested 30% of it back into the business, how much money did Alice and Bob each receive from the remaining profit? Let's think step by step and output the final answer within \boxed{}.
user