Just when I thought I was getting the hang of this :(
It's more fun this way! :-D
Why gabhaibh and not gaibh?
Because a teacher is somebody with whom you are not on the first-name basis, so you use the polite formal (ie. 2nd person plural) form instead of the informal singular.