I'd replace both if they haven't already been replaced.
The exhaust CPS is extremely easy to do, maybe 5 min job?
Exhaust PN#12147518628
About $100 for genuine bmw part or hella makes one for about $60
I guess start there since it's easy and cheaper.
Intake side will take a little longer, here is DIY:
https://xoutpost.com/articles/x5/eng...-x5-3-0-a.html