Sounds like he’s trying to exert his independence! Obviously he’s being disrespectful, and he knows better. In our house, major mouth offenses (i.e. verbal disrespect, talking back, arguing, unkind words) have their own consequence. I take my finger, dip it in some vinegar, and rub it on the offending child’s tongue. I know that seems harsh, but the vinegar won’t hurt the child; it just tastes really bad!
I then tell the child, “This vinegar tastes really awful, doesn’t it? It’s bitter, and bitter words were coming out of your mouth. If you don’t like how this vinegar tastes, what makes you think I want to hear bitter words coming out of your mouth?”
I always give the child as soon as I’m done with that explanation, and tell them that’s what will happen if they continue to disrespect me or another member of the family. Then I tell them we’re going to try (whatever the command was) again so that they can give the correct response.
This might not work for your child, but it does work in our house. This consequence is one I rarely administer because it leaves such an impression.
Tantrums are not allowed in our home, ever. I have never had a child throw a public tantrum, and I believe it’s because we were so consistent in dealing with small tantrums at home. When one of ours (they’re now older than yours) threw a fit, they were given a spanking and then I would physically pick them up, take them to their room, and set them on their bed with strict instructions that they were not to get up until I believed they could act nicely.
You can’t reason with a child who’s throwing a fit, so trying is pointless. Until they calm themselves down (alone; away from the fun of the rest of the family) it is almost impossible to speak to them, much less discipline for the misbehavior they committed before the tantrum even began.
I know these methods might seem a bit overbearing, but I can honestly tell you that we rarely encounter verbal disrespect from one of our children, and we haven’t ever experienced a full-blown tantrum like I have seen in grocery stores or at friends’ houses.
This is what has worked for us. Hope it’s helpful! 
Blessings,
Lindsey