The Companionship EXP that is shown on the screen is distributed to each active character in your party. Suppose you get 10 Companionship EXP. That means that all four characters in your team will get 10 Companionship EXP. A rough formula can be Companionship EXP * Characters eligible for EXP in your party. The Traveler cannot get Companionship EXP, and the characters that are at the maximum Friendship level are also out of the scope. So, whichever characters you have in your party whose Friendship level isn't 10 will get the Companionship EXP that's shown on your screen. If there are 3 characters, then the total EXP would be 30 if 10 is shown on the screen. It's actually a good distribution system because if you have 2 characters who are new to the team, then they both will be progressing at the same pace. But it depends on your team composition. Personally, I keep a maximum difference of 20 levels between my strong and weak characters in a team. If I have two characters who are level 90, then other characters should be at least level 70 to compensate a bit for the firepower. I'd recommend you to choose whichever setup suits your characters as there are a lot of permutations for team compositions in Genshin, depending on a lot of factors.