Jordan works part-time at a bookstore and earns $12 per hour. He also does freelance graphic design and earns $18 per hour. Last week, he worked a total of 25 hours and earned $360 in total. How many hours did he spend on each job? Let's think step by step and output the final answer within \boxed{}.
user