Tell your daughter that she can demonstrate excellence and competitiveness in a fair context that will help her friend succeed too. Encourage girls not to be afraid to win. It can be a gift. And also encourage girls to talk together about it. Some girls are so aware of that that they stop competing with boys.
Many boys are uncomfortable with themselves and trying to figure out what it means to be a man.
They think being a man means being faster, stronger, and smarter than women. Boys will say and do sexist things when they're confused. I would counsel a girl that they will be happier if they can find boys who respect and support their talents. Fathers play a big role in this, too. If fathers can talk about women they love and respect who are better than they are at something, daughters can learn it's possible.