A boat can travel 90 km upstream and 60 km downstream in total 8 hours. Find the time taken by it to travel 40 km downstream and 45 km upstream.