Buying and selling a security at different exchanges, change of listing

Yes but you might have to pay a fee for changing the listing.

https://forum.mustachianpost.com/t/interactive-brokers-q-a-2023/9780/119

The one it is traded in under the given ticket at the given exchange.

You will have to pay to either one. SQ must be more expensive than IB.