Alai solves the problem of the divisiveness in the launch group by befriending Ender, thus becoming a bridge between Bernard's in-group and Ender's outcasts.
When Alai and Ender start becoming friends, it's notable that the power dynamic within the launch group moves away from Bernard, Alai's friend. Due to the fast friendship he forges with Alai, Ender manages to break Bernard's control over the group, and in the process, he sloughs off his previous status as an outsider.
Now, it is no longer possible to speak of there being two groups among the Launchies, Bernard's and Ender's. Instead, there is a much more unified, cohesive unit with Alai as launch leader. It says a lot about Alai's ability to bridge the gap between two separate groups of boys that when it comes time to choose a launch leader, he is the near-unanimous choice.
As one might expect, Bernard is none too pleased with this development and sulks for a few days. But after that, he's fine and gets with the program, settling into the new arrangement.