He got it exactly backwards.
The federal preemption doctrine comes into play when a state is acting at odds with federal law. Arizona was applying federal law, Obama was the one trying to frustrate the law by not enforcing it. The court decision was clearly wrongly decided but why would that surprise anyone? The courts are now an enforcement wing of the far left.
Sanctuary cities are clearly attempting to frustrate federal immigration law by refusing to cooperate with ICE. It's no different than if they refused to forward firearms background checks to the FBI. The cities may have legitimate gripes about the burden of complying with federal law. So do school systems, water and sewer treatment facilities, housing agencies, etc etc. They don't get to pick and choose.
Obama "chose" not to enforce federal law and the state took it upon themselves to reach into jurisdiction that does not belong to them. You may disagree w/Obama's decision not to enforce the federal law, but you can't disagree over the state's overreach here.
Yes, the states are undoubtedly trying to frustrate federal immigration laws in the case (as some states disagree w/the new admin's stance), and they are well within their right not to follow the feds on this.
Your federal background check analogy is bunk because not forwarding a federal background check to the feds constitutes a violation of the constitutional right of citizens to bear arms, as the background check is a necessary step into getting one. Not doing so would be the state infringing on a citizen's rights. Same reason voter ID laws keep getting shut down.
You don't like it, change it. You could make a case for instance, that by not enforcing immigration it somehow hurts corporations' earnings and that corporations being people too (read citizens united) the states are infringing on their 14 amendment.