Trifle, behaving well and dealing with difficult situations is something children need to learn. When your child is learning to read or do their times tables, do you feel the need to deter them from getting it wrong? Even when you think that they really must know that word and they've managed to read it before, would it ever occur to you to punish them for getting it wrong?
If you punish a child who is being rude, that doesn't teach them any level of understanding about rudeness (even if you give them a mini lecture in the process). It doesn't teach them what not being rude is. It doesn't teach them how it feels when someone is rude to you. It doesn't show any understanding or care about what happened that cause the child to be rude in the first place (there is ALWAYS a reason).
All it teaches them is that you are more powerful than them and when they don't do what you want them to do, you will do nasty things to them.
Children can be rude for various reasons. If he wasn't doing his work - could he do it? was there something he wasn't sure about? was another child doing something to annoy him? was he still upset about something that happened earlier? etc Show some empathy, some concern. GENTLY ask questions about what was happening at the time or over the course of the day (never 'why did you do that'). Try to work out what lead to the child behaving that way.
No it's not ok to be rude or refuse to do work, but it's because he doesn't have the ability to express what was going on for him. Being rude is a great defense system for a child who feels stupid.
Then mum doesn't listen or care what was going on for him so he tries to make her listen in the only way his 6yr old mind knows - he's rude to her too. They are both then forced into this position of punishment and it will achieve absolutely nothing.
He may well comply and write the letter, he may well cry and promise that he will never be rude again and he is really sorry, but he's doing all of that to get out of the punishment. He hasn't gained any understanding about refusing to do work or being rude and he hasn't learnt skills to cope and respond any better when the same situation happens again.
Talk to him, LISTEN to him, then discuss what happened. Show that you care about his feelings (without saying 'but'). Then discuss how the other people in that situation felt. Children are selfish creatures, then need their feelings to be addressed before there is any chance of them understanding someone else's. That's when you might get a genuine apology from him, and that's when you can talk about how else he could deal with that kind of situation again.