In the episode Mirror Mirror the landing party get sent to a mirror universe during a transporter malfunction while beaming back to the Enterprise. They conclude that they must have switched places with their "mirrors" who were also using the transporter. Eventually Scotty (the man is a magician) figures out how to send them back using the transporter.
When they appear back on the USS Enterprise they are on the transporter pad. But doesn't this imply that the "mirrors" would also have to be in the process of using the transporter for this switch to occur again? And if so, how would Spock on the USS Enterprise know when to place the "mirrors" on the transporter pad (he had them placed in a holding cell)?