We have the next information
If with 5 works take 9 days to build a barn, then only one worker will take five times the time given(9 days), therefore if have that 1 worker will take 45 days to build a barn
then we divide 45 between 3 in order to know how many days will take to build a barn for 3 workers
to 3 workers will take 15 days to build a barn
If the customer needs to barn a build-in 7 days
we will need 7 workers to build a barn in 7 days