Capital One interview question

Ice cream company case question with basic algebra