Hello and welcome to EmpowHer,
To understand why you cannot become pregnant from this, I'll give you some basic information. Girls ovulate once a month. Ovulation occurs 12-15 days before your period. This is when one egg is released. During that few day window the egg can be fertilized and pregnancy will occur. If it is not fertilized it is eliminated during your period. Birth control works by stopping ovulation, thats why it prevents pregnancy.
In order for the egg to be fertilized, a man must ejaculate directly into your vagina during penetration. The reason that is the only way is because because the sperm must be sent swimming past the cervix which is at the back of the vaginal canal. Sperm dies quickly in open air and can be damaged easily.
With all that said, I can assure you there is no possibility of pregnancy from the events you described. I hope that helps.