If prior to facelift model. 3 screws removes the round cover. Remove the "U" shaped clip and that allows the rubber bellows to slip up the HT cable. Then there is a bulb retained to twist to get the bulb out. PROBLEM: The X5 does not use H7 Xenon bulbs unless you retro fitted the xenon lights.
Sure would help if you were to tell us what year and model you are driving and anything else you might think would help us to help you.