My 2 friends

I have two friends. I don't wanna add names so I'll say N and R. Recently R had began to date her bestfriends ex boyfriend that N was still in love with. This is the second time R has gone out with her ex. N was extremely upset and was crying as youd expect. Now it's been a few weeks N gave up caring she kept to herself about it all and R keeps saying stuff about her. R called her a petty bitch so I told N that. I didnt want N to be in a toxic friendship that'll keep pulling her down. R constantly keeps doing things to N. I'm only wanting to know what people think. Did I do the right thing? Or should I have kept to myself...?