Those who pointed out that you can’t control their behavior are correct and their happiness or unhappiness is their own responsibility and not yours.
When they argue with each other it is undoubtedly unpleasant but you do have a choice to absent yourself from it. I know whereof I speak cuz I spent 95% of my childhood in my room with my nose in a book or engaged in every extracurricular afterschool activity or sport I could find. Had it been allowed I would have also spent my time at the dinner table with a book also
I know how much this sucks for you and I left home to work even before I was finished high school.
However, since you and your brother are 18 or over there is one more thing you can try. Either sit them down together or separately and as calmly as possible let them know how this makes you feel. It’s true that you can’t change their behavior toward each other but you certainly can change whether or not you will continue to participate. If they need someone to vent to let them find a therapist. That is not your job. You do have the right to politely as possible request that they stop badmouthing each other to
you.
Once you have made your request clear to each of them you have the option to disengage whenever the force of habit becomes too strong and they start using you to complain about the other. You have the right to calmly pause the dialogue, remind them of your specific request to cease doing this with you and just disengage. Either walk away, change the subject or whatever.
I realize that sometimes it’s easier said than done but practice makes perfect and it may help you cope until you can get out on your own.
I wish that I had been old enough to do that but I don’t think it works as well coming from a 15 hr old. :)
Anyhow it’s worth a shot for you. Good luck. Hope some of the many different bits of advice offered by the collective can help make this more bearable for you.