I'm not an expert, but I understand that you can swap the engine as long as the engine is from the year or a newer year than the car. The necessary smog equip must be on the car then you take it to a referee station...
the cammer probably won't pass the ref, but since the 07 cobra engine will...