Switch out the circuit boards on your rear lights that are not working. They're are cheap; $5 each i got a pack of 4 and switched out 3 of them that were not working and it did the trick.
Pull out your headlights and disconnect, then you'll see a small circuit board to slip out and replace. Youtube helped me!
Ah the famous trifecta! Many things it could be but one of the most common is either the transfer case fluid needs to be changed, or the transfer case actuator needs the gear replaced. That is a fairly common problem that gets overlooked on the x3's. My 08 had that issue before and we took it to the shop, and that's what they told us was wrong with it. They said it's a common issue with the x3's. So if you can't figure it out, check the transfer case.
Pull out your headlights and disconnect, then you'll see a small circuit board to slip out and replace. Youtube helped me!