I’m going to deviate from the party line here, and say I’d have knocked him out, and then gone straight for his mate.
I think one of the best pieces of advice you get given in our neck of the forum is that when dealing with real world violence, you need to have your own set of principles that help you make decisions like this in the moment, where hesitation may get you killed.
My own principle on this is that I will walk away from anything I can, will never look for trouble, and will happily apologise to someone looking for a fight to avoid a confrontation. But, at the point someone does not take the way out I give them, I’m going to do everything in my power to put them out of action so that my safety is not in question (more than it may need to be as the circumstances dictate).
A hook to the back of the head, is about as close to lethal as you get from an unarmed bloke. All the good bits of your brain are back there. A guy comes up behind you, smashes you in the head, and you have to turn and assess the situation before you decide how to respond? To me, a punch in the back of the head is an act of attempted murder.
It may not have been the blokes intention, it may not be what a court thinks, but you ability to lead a functional, sentient life relies on that bit of your brain not getting scrambled. A blind side attack to that area of the head is a potentially lethal confrontation - and it’s for this reason that in my own view, the appropriate response is to bury the guy immediately.
Now, because of the particular circumstances of the attack on you, it looks like you did the right thing because no conflict happened after the initial punch, you walked away safely, and all was well. But I would suggest you did the wrong thing, because at the point you turned to assess, you had no idea whether that was a sober, pre-meditated attack designed to put you in the ground.
On this occasion, you got lucky, but had the situation been different, you could well have been dead. I don’t personally want to leave such an outcome up to chance, particularly when the law would be firmly on my side for a bare-fisted response.
Once you’d established that the situation was not yet deadly, and decided you weren’t going to beat the piss out of him, staying there to mock him by yourself in front of a growing group of his mates seems like about the dumbest thing you could possibly have done. Laughing at someone in front of their mates can easily push someone who is on the fence about fighting into launching an attack they otherwise wouldn’t want to do. If his mates are close with him, they may well have partaken in an ass whoopin’ on you for belittling their friend - particularly as the came on the seen late and may only have had half the facts.
Either act first, with real violence designed to put an immediate end to the situation, or let it go and walk away, even if it looks like you lost to people around. Half measures, and allowing your ego to dictate your actions, will get you badly hurt or killed more certainly than anything else in this life. ‘Put up, or shut up’.