Barbara could know which buttons to push, but how could she know in which order to do it? Also, at the very least, there are 24 possible code variations with the four fingerprinted numbers if the code is a four digit number. More, if the code has more than 4 digits. She was very lucky indeed to have hit it on the very first time.
It has been established that Mayor Hill's first name is "Hamilton". However, in this episode, when Hill is abducted, he had been in his office signing official papers with the signature "M. Hill". I don't know about you, but the mayors I've ever met sign documents with their full name, not their title.
Barbara Gordon: A police commissioner's daughter doesn't get all her education in school.
Alfred: I do wish your toys wouldn't play so roughly with you, sir.
This episode is episode 11 on the Batman: The Animated Series Volume 2 DVD.