Oh please do not shoot this messenger ok? The gentleman had the decisive point in that you were both going to the same place, leaving at the same time no matter who boarded first or last. As frustrating as it was, and believe me, I know exactly how you felt, according to propriety you had only two options: First, ask the gentleman if he would mind you going ahead of him since you were already prepared for this, or you should have bit your tongue, take multiple deep - calming breaths and waited.
You did, however, do the right thing in apologizing to the fellow and even offering him a spot ahead of you.
Again, I fully empathize with what you felt. I loathe those checkpoints along with everyone else and I'm also one of those people who approach them prepared to glide on through. When I'm backed up/slowed down by a newbie to the whole thing, I entertain my thoughts with wondering where the novices are from and how exciting this must be for them while also being a little intimidating.
Composing 'to do' lists in my mind or updating my song list for new downloads once I get my phone back are other distractions.
I hope the rest of your trip was uneventful and dare I say, 'relaxing' ?