Hi:
Check out this site for detailed (and I mean detailed) instructions on cleaning the MAF.
http://www.louv.tv/cars/m5/MAF/
He uses an M5 as an example but the previous post shows you exactly where it is on the X5(on the left on the X5, on the right on the M5).
I had problems with my MAF and this site really helped. Give cleaning a try first and save some $$$
Good luck