Capital One Interview Question

It was a cashback question. OOP