I understand the public key and the private key are generated at the same time. The payload is encrypted with the public key. Sender Alice sends public key $[n,e]$ and cipher text $C$ to Bob.
Now is Bob recomputing the private key $d$?
If Bob is computing the private key $d$, can a "Man in the Middle" who gets the public key and cipher text also compute the same?
Or is there a scenario in which both Alice and Bob know the value of $p$ and $q$?
I am confused. Please help me understand this in a scenario assuming Alice and Bob are located in two different geographical locations.