On the day the villager is in boxes, you let whoever's going to adopt that villager into your town. When you go to that villager's house, let the other player talk to that villager and there will be a suggestion in the conversation for the villager to move to the other player's house and the villager will move there if the player says yes. Boom. Adopted. You can verify with that villager if they're moving to the other town afterwards if you like.
Once you and the second player leave the villager's house, you can't go back in. You'll just read a sign that says "Moved out"
I hope I was able to explain this well orz