Here's what you did wrong:
we already tried to explain that it was a joke
Saying "it was just a joke" is essentially saying that offensive language should be disregarded as long as it's couched in a "joking" form. It's how a five-year-old can tell their sandbox enemy "You're stupid! Just joking, can't you take a joke!"
The fact is that jokes are one of the ways that various -isms are transmitted socially. There is research showing a correlation between enjoying jokes based on stereotypes and actual sexist/racist behavior. Also, being the butt of a joke is hurtful!
In other words, the fact that it was intended as a joke is not and should not be part of any excuse. By saying this, you've unintentionally given A the impression that you don't take this problem seriously - which is also borne out by your question. You're asking
What can I do to make sure that he doesn't feel offended anymore?
A better (IMO) question would be
What can I do to make sure that people aren't being offensive?
Because that is most likely what A wants - not just to be sure that B won't make this particular kind of joke again, but to be sure that this community where he is spending his time and energy is a place where people don't get teased/bullied and where jokes against disabilities, race, sexual orientation etc are no more acceptable than "non-joking" racism/sexism/etc.
So, my suggestion is that you look over your community guidelines if you have any, or create them if you don't. Exactly what goes in them will depend on what you want from your community. A good example is the Dreamwidth IRC guide. Also, the Geek Feminism wiki page about online harassment has some good info - it's mainly focused on the specific abuse targeting women, but a lot of the information is useful for other marginalized groups as well.
If you do this and actually enforce the community standards, you risk losing some users. The ones you'll lose are the ones who feel that their right to say what they want regardless of how it affects others - like the five-year-old in the sandbox. But if you don't, the ones you'll lose are A and people like him.
For A specifically, I'd suggest that you involve him in creating and applying the guidelines. He's been a target for stuff like this his whole life, so he knows better than most people what needs to happen for him and others like him to feel welcome.