Tell them what they are doing is wrong, that it's obviously out there (you became aware of it) and someone else is going to find out and it'll all end very badly for B if they don't stop it and/or correct it.
Obviously, there is a lot more to it than that, and depending on your relationship that may be easier said than done. But from the outside looking in, it seems to be better than either: letting it slide or turning them in.