Hi mate,
I run Sram shifters and mechs and find changing the gear cable a doddle (have ran Sram for the past three years with no issues so just ignore stupid, pointless comments that don’t help).
I find it easier removing the shifter from the bar but as I use matchmakers this is a 2 second job.
Start by having the mech in the smallerst cog and the same for your chainset if you’re running a double/triple.
On the X9 shiftter you should have a little black cover that just ‘pops up’ so you can change the cable, I’d snip the inner as short as possible so you have less to pull through the shifter.
Simply thread through a new cable, tighten at the mech, cycle through your gears and you should be good to go (your high/low screws shouldn’t need touching either). Oh, and replacing the outer is as simple as removing the old and replacing with new!
There isn’t any need to take apart the shifter so I wouldn’t recommend this, I did and learnt the hard way, when I realised how simple it was I was kicking myself!!
Hope this helps.