Let's say Airline A placed an order for an aircraft a while back. After a bit of time, Airline A decides it no longer has a need for the aircraft and decides to cancel the order. Meanwhile, Airline B decides it wants to buy said aircraft but doesn't want to go to the back of the delivery line. Is there a process where Airline B can take Airline A's spot in the delivery queue? I vaguely remember seeing something like this happen before, but cannot find any sources.
In general yes, but depending on how close the aircraft was to completion they have to live with a different cabin and cockpit layout than what they are used to or would had ordered themselves.