Luxu became Braig early on before meeting Xehanort because he needed to keep an eye on No Name. when he met Xehanort in Radiant Garden he saw that he was the one who would eventually recreate the Keyblade War. he needed to stay close to Xehanort to keep his eye on No Name and let Xehanort possess him, so Luxu and Xehanort shared the body right before the BBS Keyblade War and then Luxu shows up to face Aqua later already possessed. the concept of Braig could be a fake name, or facade so that Luxu remains hidden, or it could be Luxu possessed him and rid the real Braig of his heart and it went into Kingdom Hearts like Strelitzia's heart.
After BBS when Luxu-Braig meets Terra-Xehanort, he figured that MX had put his heart in him. he does suspect that Terra is also in there, but is too weak to fight for the ownership of his body, maybe similar to Braig being weak to fight out Luxu from his own body.
A few years later, Terra-Xehanort figures out how to resummon No Name and turns Luxu-Braig into Xigbar and begins calling himself Ansem (3D) and loses his heart eventually. Luxu-Braig knew this was going to happen because he had met time travelling YX earlier (Re:Coded) who began the process of looking for vessels for his future self
when MX is defeated in KH3 and Luxu returns to the past with Xigbar's body, he is no longer possessed by MX, now he is possessed by darkness, which will later make the foretellers become the 7 darknesses and Sora and co to become 13 lights