What comes first ??
I'd put the trans in first. You could just slide a couple of bolts through the rear mout so you could lower it a bit for access, That way when you put your shifter in and position it you will now where to route the cable without rubbing on the exhaust or kinking it.