My grandson was a biter at about age 2.5, for a few brief weeks that felt like eternity for his parents. We did a tremendous amount of research on the phenomenon. The single most effective strategy to correct it is reportedly to shadow the biter, especially while in situations where he's likely to bite. An alert adult needs to practically hover over the child, and hopefully anticipate the moment just before the bite comes, and swoop in and remove the biter (or the bitee, if closer). Firm words "NO biting! Do NOT bite! Be gentle!" and redirection help – separating the biter and giving him something else to do.
We also gave my grandson many lectures and role-played with puppets and toys lessons about biting, but that was hours after the events at daycare, so was possibly helpful, but not as effective as an immediate response. Fortunately, the daycare was aware of the need to shadow, and bites only happened perhaps three or four times altogether. Still, that was three or four bites too many for everyone concerned.
Harsh punishment, or even time-outs, don't reportedly do much for most biters, because it's an immediate impulse, usually an expression of possession of a toy or frustration toward a bossier, stronger, or more determined child. Those impulses are extremely hard for a 2.5yo child to contain. But a reaction from adults right when the impulse hits catches his notice. It will usually need to be repeated a few times.
If your friend is open to employing this method, you might agree to trade off shadowing duties.
This is not usually a case of the biter being guilty, and the bitee being totally innocent. If the biting is over toys, you might be able to make your daughter aware of whatever part she plays in the dynamic. Since she's significantly older, she may be able to either avoid those situations that have gotten her bitten by moving away when the little boy is getting frustrated, or not grabbing toys that the boy wants, or even sharing more generously, if she's able to control her own impulse to possess a toy.
And of course, kids that age want the toy the other person is playing with. Young toddlers are fascinated by other kids, but don't play with them so much as beside them – parallel play. Unless your daughter and the friend's child genuinely seem to enjoy each other, it might be a good idea to keep them separated until they're both a bit older.
Added: I do agree with Riley that a child understands leaving as a consequence. If that's works and it's agreeable to you and your friend, do it IMMEDIATELY when a bite occurs, or even an almost-bite.