The villager that moves out is random. However if Cookie moved in, she couldn't move out since the last villager to move in never pings to move out until another new villager moves in. So technically, Rosie is more likely to leave than Cookie until you got another new villager after Cookie. You can convince villagers to stay though.