It definitely is possible. Though the vagina is quite acidic and a dangerous place for sperm, they can survive better in there than they can out in open air. So if sperm managed to get out and into the other girl, it is very possible. It's reality, just such a slim one. Sperm does tend to pool around the opening of the vagina since many people stand upright and move around and if two vaginas touch it's very possible.
I think is was careless of the girl to have sex with another guy, let him cum inside, then go home and risk it with her girl. I wouldn't want to get preggers by some guy I don't even know because of someone else's carelessness.