Explanation:
the task takes 5 people working 8 hours a day for 9 days.
so, in total, it takes
5×8×9 = 360 individual work hours to compete the task.
now 6 people will work 5 hours per day. that is
6×5 = 30 work hours per day.
we still need to do 360 work hours in total, so we need
360/30 = 12 days to complete the task.