Pearson interview question

Trying to pass the qualification tests