This may seem pedantic, but you don't solve this. They can solve it, but you can't make them.
There are two approaches that come to mind on working through this:
- actual conflict mediation
- team building
Conflict Mediation
There are books and certifications on this - far more than fits in a Stack Exchange answer, but a starting point is to talk to them individually about what has happened, what they would like to see as an end result, and potentially ask them things like "why do you think the other person is doing what they are doing?" or "If you were in their situation, what might cause you to take similar actions?" to create some empathy.
After some one-on-one conversations you can ask if they are up for some group conversations. There is a nice technique you might find helpful called non-violent communication.
The risk with a conflict mediation approach is that if you overstep you can become part of the problem and enflame the conflict.
Team Building
A potentially safer, though far less direct approach, is to focus on team building. Exercises like identifying team values and working agreements can help create new shared positive experiences in the team that start to supplant the old negative ones. They can also allow the team to plant some working agreement items that take the edge off the problem. For example, the team might agree in their working agreement that anytime there is a task that only the senior person knows how to do, they will pair with a junior developer and the junior developer will do the work with the senior one mentoring.
This is more indirect and will not overcome severe personality conflicts, but can be very helpful if the conflict is normal team-forming stuff.