Ditto Julia M.
Now, my suggestion is, and what me & Hubby do with our kids is: instead of trying to 'cease' his behavior... why don't you just try and teach him coping skills and OTHER ways to "problem solve" situations? Coach him on it...
If that boy hits him, your son is probably hitting him back, as a reaction and to defend himself. In a little child's mind.. it makes sense. Cause and effect. And, now your son gets frustrated and hits others. He knows its not 'good' but little children this age still do not have great 'impulse control' thus they make mistakes. It's okay.
No, time outs don't work for some. And, I believe instead of punishing him this way... talk with him about it... bring up scenarios and HOW he can handle it and problem solve it. Even act it out with him. That is what we do with our kids.
For example: your Hubby can be the boy... and you be another friend. Your Hubby can pretend to 'hit' him & be sassy (as some kids are)... and then ask your son "What can you do different? What can you do to stop him... what can you do if you don't like it?" etc. The answers would be, for example: he can walk away from it, he can tell the boy to stop it, he can tell his Mom, he can tell the Teacher, he can use his VOICE in a stern way, he can go and simply play with someone else, he can CHOOSE another friend etc. ALSO, some kids need help on what to say, in reaction to something. For example, my daughter will tell me about her day at school, and if a girl was sassy & cocky to her or exclusionary, my daughter will tell me.... then, knowing my 'cue' to open up with her, I'll ask her "hmmm... what do you think you can tell her when she's being mean to you?" Many times my girl has good ideas... but sometimes she will say "I don't know..." and so I will give her simple ways to actually SAY something in return. For example: "you can tell Sally stop it that is rude." or, "Friends don't treat each other that way..." or, "If you don't stop, I will tell the Teacher..." So, I always give my girl a variety of different ways to problem-solve something and then how to communicate it. And, it has now become something she really looks forward to, with her telling me about 'icky' things that happen at school and her picking my brain about it to see 'how' it can be handled. I did this with her from about 2+ years old... and now that she is 6 years old, she is really articulate, confident and is really wise at discerning other people for better or for worse. It's a good 'skill' to teach them... and it channels their 'frustrations' in another more positive direction.
So, you are "teaching" a child how to solve problem, how to circumvent physical trouble, how to use his voice and inform an adult about "wrong" behavior, how to decide what is wrong & right....and that no matter what, that he can come to his parent for anything, good or bad, and that he can ask his Parents for HELP and guidance. Not just for punishment.
THAT will teach and lay a solid foundation in a child... for later as well. TEACHING them how to problem solve and how to 'cope' with problems.
I believe, that this is what your son can benefit from. All kids this age hit or what not... but the trick is to teach them HOW to handle it, HOW to problem solve, HOW to discern situations, HOW to report it to an adult/teacher/their parent, HOW to use their voice etc. It will also give them confidence.
THIS is a good boy you have. He's just going through growing pains. He's normal. It's not easy for him either. BUT, teach him now... a child needs 'coaching' from their Parent... not just punishment/scolding at any infraction they do. Sometimes they are just plain confused about what to do. So we have to show them 'how.'
All the best,
Susan