Home Office Interview Question

How would you solve this task