@Batty251 you're on the wrong track. Simple advice is scrap the 2.9t XC90 and move on with your life.
As @Ex850R mentioned, these volvos use a complicated canbus system. You can't just swap an "ecu, immobiliser and key"
Even if you had identical cars, it wouldn't work without swapping every programmed module.
Note that the two engines you're talking about using have different gearboxes and transfer cases.
Brief rundown to try and talk you out if whatever you're trying to do.
All of the electronic modules on the high speed canbus are vin programmed. This includes your dash cluster, CEM module, ABS module, ECM and probably your rear view mirror as it's the receiver for the central locking.
The wiring looms (engine bay and body) will be vastly different between the two models.