You probably should have joined the other group, but overall nothing really wrong.
I did have a single guy hit into our group 2 holes in a row one time, we had 3 people and were on pace with the group in front of us, he didn't want to join us, then hit into us 2 times. The last time hit my bag as I was waiting, being slightly stupid and a huge asshole in my late teens, I turned around and hit it right back to his tee for him. He went nuts, rightfully so, I should have just kept his precious Pro V1, which for some reason he brought up in our pissing match that he played a ball I couldn't afford.
Now had you been like THAT guy, you would have been in the wrong. Being wise enough to walk away from idiots is the best course of action, retaliation, arguing, degrading, not so much. There is no winning by anyone when you go there, so in all honesty, you probably could have handled it better, but shit happens.