David and Emma are working together to clean a large warehouse. David can clean the entire warehouse in 12 hours by himself. Emma, working alone, can clean the same warehouse in 8 hours. If David and Emma work together for 3 hours before Emma has to leave, how long will it take David to finish cleaning the warehouse by himself? Let's think step by step and output the final answer within \boxed{}.
user