Shoe Palace Interview Question

I received an unexpected math quiz.