The blame isn't for studying the old test. It's for not letting the instructor know they had seen the exam already. That's when their behavior crossed an ethical line.
The instructor isn't blameless here - he both misrepresented his creation of the tests, as well as was lazy and pulled questions from his test bank. But the students should have let him know that they had acquired the test ahead of time.
Nobody came out of this looking good.