You were probably charged with murder because you attacked before they became hostile to your character.
If you talk to the leader, and get him angry then they will attack, and you can kill them in self defense. If you free the prisoner first I think they also get quite upset and attack.
This is it. I have done it this way as well and gotten no bounty, and gave him gear and he did help. Died, but he didnt run at least. I also have done it without gettng them grouped closely enough and wasnt able to interact fast enough with the prisoner and he jackrabbited on me too. And, yep, I got hit by a bounty. It was a massive...40g. Pfft, I got 10 times that for the gear they donated to me. Paid it and the guards were smoochin my butt again.
So, either way....don't worry about it. Bottom line is this...you get to KILL THALMOR. And that, my friend, is (like the commercial says)
PRICELESS! Good Hunting!