if Friend A finds out, and finds out that you knew, Friend A will never trust you as a friend again.
But if you tell Friend A about Friend B, Friend A will regard you as a true friend, then Friend B will regard you as a traitor.
It's hard to choose between telling the truth and letting friend A remain ignorant of what is happening right under his/her very nose, isn't it?
Put yourself in Friend A's shoes for a minute... You just learned your daughter has been sleeping around with one of your good friends. You also learned that another friend knew about this but never told you. Wouldn't you feel betrayed by both of them?
Or... You were just told by your friend your daughter has been sleeping around with another friend. The friend who told you cares about you enough to break his promise that he'd never tell, to let you know what was going on. I don't know about you, but I'd feel good that someone is kind enough to tell me the truth, even if it does mean they had to break a promise.