Does Switcharoo target a unit when cast or on resolution?
On cast. Switcheroo chooses (targets) its two units when it's finalized onto the chain, not during resolution.
The card text "Swap the Might of two units at the same battlefield" requires you to pick two specific units — that's a targeting choice made during Step 2 of playing a card (Rule 355.5–355.8). You must have two legal targets available at the same battlefield before you can even play it.
If an opponent reacts by moving one of the targeted units off that battlefield, you can't swap the target to a different unit — the original targets are locked in. On resolution, if a target is no longer at the same battlefield (or otherwise illegal), Switcheroo simply fails to affect that unit, but the swap still applies to the other target if it remains legal.