Tom and Jerry are working together to paint a fence. Tom can paint the entire fence in 5 hours, while Jerry can paint the same fence in 7 hours. If they start painting together, but Jerry has to leave after 2 hours, how long in total will it take to paint the entire fence? Let's think step by step and output the final answer within \boxed{}.
user