T-Mobile interview question

Solve x Scenario