What action/outcome is it that they are looking for? Why can’t they speak to each other? Can you facilitate that? Or use a mediator from another department?
To be honest unless one has done something that the company would consider gross misconduct you’re probably looking at a situation where they have to continue to work together even after a grievance/disciplinary so my advice is to get them in to a place where they can do that now, rather than going through a formal process where there are no winners, they air all the bad feelings and problems but not in a constructive way.
You need to speak to each separately to fully understand the issues and determine whether there is cause for complaint.
Mediation is the first and best step if you feel that they are able to speak sensibly and come to an agreement.
They need to understand that they are at work so need to behave professionally towards each other, they do not however need to be friends.
I work with lots of young(ish) people who semi to think that work is a social activity, get annoyed with each others Facebook/WhatsApp/twitter interactions and so on. I have had to have several conversations about separating personal and work lives.
If mediation does not work or they are not willing to do it then they need to outline the issues formally, detailing specifics and what outcome they want. You will then need to investigate and deal with it under the grievance process. HR should assist you with that.
I've spoken to both, so I've made detailed notes about what each claims happened. If what A says is true then B was completely out of order and vice versa. During the argument, B threatened to raise a grievance against A. On balance, knowing them both, I believe A more than I believe B.
B has been the subject of complaints from other staff, but no-one ever wants to take it further.
HR are aware but IME they are always careful not to take sides and I can't see anything they do changing B's behaviour.
Good point about reminding them it's not being professional to have that argument in the office - regardless of the content.
Do you have a set of values/behaviours that the company expects everyone to demonstrate?
For us we have: passionate, agile, empowering, courageous. Behind these values sit behavioural expectations.
You may be able to use things like this with B even if no one makes a formal complaint. You can put together a targeted improvement plan eg
"Does not consistently demonstrate company expectation to 'empower' colleagues as evidenced by ... complaints raised to line manager during last .... Months regarding....
Have discussed alternative tactics and solutions for when ... is feeling frustrated and offered [managing conflict/dealing with stress/customer servive ] training. Further complaints regarding this behaviour within the next 3 months may lead to formal disciplinary action being taken."