If either permanent targeted by the chaos ability is an illegal target by the time the ability resolves, the exchange doesn't happen. If both targets become illegal, the ability doesn't resolve.
Cliffside Market
Neither permanent you target with the chaos ability needs to be one you control.
The controller of a face-up plane card is the player designated as the "planar controller." Normally, the planar controller is whoever the active player is. However, if the current planar controller would leave the game, instead the next player in turn order that wouldn't leave the game becomes the planar controller, then the old planar controller leaves the game. The new planar controller retains that designation until they leave the game or a different player becomes the active player, whichever comes first.
Magic: The Gathering · ™ & © Wizards of the Coast · Illus. Matt Stewart
Card data via Scryfall. Rarix is fan-made; not endorsed by the rights holders.
