Munchkin interview question

How did you come to the solution for this problem?