Relax -- the 5-year-old isn't evil. She's just trying out a couple of new and exciting words that got a rise out of a grown-up, and now she's having fun sharing something "forbidden" with another kid. I'm guessing neither of them has a clue what this stuff really means, though the older one probably has a more concrete idea than your child does.
What they do know is that using this language gets people to pay attention to them, which, of course, makes it more than worth repeating. If I had a nickel for every time Lila said "booty" or, even worse, shook hers in a suggestive manner in front of company, I'd be able to afford those Jimmy Choos I've been drooling over. Instead of busting up the friendship, have a talk with the mom -- nothing heated, just a simple heads-up that her child's been hipping your preschooler to some words you'd rather your kid not say. She probably already knows her child uses them (maybe she knows her kid learned them from her!) but isn't aware that she's holding class with your daughter. Armed with all the info, your neighbor will no doubt talk to her child. In the meantime, don't bother punishing the kids; they'll just use them more. Instead, the next time either child lets a profanity rip, say, "We don't say that." If they keep it up, ignore them. Soon enough, they'll see that it doesn't get a reaction out of you, and they'll stop.
Finally, a note about your child's older friend: Age difference can be tricky. She's got two years' development over your child, who may pick up on things she's not ready for. (Lila, 5, has begun shunning "baby" books and TV shows for the more mature fare her older sister, Mari, 8, favors.) To help stem the influence the older child may have, set up some playdates with kids your daughter's own age. Hopefully, her fellow preschoolers' vocabulary will be cleaner, too.