The correct answer is A. mental set.
The fact that John managed to solve five problems with a specific sequence of operations was not wrong, but what became a hindrance for him was the incapacity to change and adapt when he faced another problem that required a different aproach. His being fixed with the pattern of the five solutions is a manifestation of Mental Set.