Distraught and Seeking Advice

Hey Fellow Users!
So I just found out that I'm pregnant! Whoo! I'm suppose to start my period on Monday (01/02) but I tested early and they came out positive! Still a little nervous and doesn't feel like it's real... This is my first. 
Here's my dilemma... My two best friends (all 3 of us are a group) both had miscarriages this year... one in the summer (we'll call her "A.") and one about a week ago... (we'll call her "B.") 
B told me she was pregnant first, but didn't want to tell A because it was so early, and she had had a miscarriage last year, too. Unfortunately a week later, she miscarried. I tested on Wednesday and immediately told A. So the dilemma now is.... I can't talk to A about how to tell B, because A doesn't know that B was just recently pregnant... How do I tell B when the time is right after such a heartache of a time? How do you tell your best friend that you're pregnant after her miscarriage and both of you dreaming of becoming pregnant together? 😢