At least now you know from experience that asking answers from the prof isn't worth it. Just because he told you the answer doesn't mean you can't study the questions and solutions so you understand the process. It's one test - stressing out about it isn't worth it, go in and do your best. It's too late to do anything else about it now, so you may as well not worry about being unprepared. Good luck!