Shell interview question

Based on the reading material, how would you solve this problem.