Capital One interview question

The difficulty level increases after each step.