Okay, let’s get into this deeper. Your position is really untenable and for several reasons. The Holy Spirit is not the same thing as Elijah’s soul or personality. Having “the spirit of Elijah” does not mean that one is Elijah; rather, the expression (“spirit of Elijah”) refers to the charismatic, prophetic gifts that Elijah himself possessed. For example, if one reads 2 Kings 2:9-10, here, Elijah’s disciple Elisha asks to have a “double portion” of Elijah’s spirit, and Elijah tells him that his request will be granted if Elisha sees him taken up into heaven, which he does. Thereafter, Elisha, too, possesses power charismatic powers and is able to work miracles. So, the “spirit of Elijah” is merely the prophetic power and character that Elijah (the greatest of all the prophets) possessed; and John the Baptist received this very same prophetic power and character.
As for when John was filled with the Holy Spirit from his mother’s womb (per Luke 1:15), this is directly depicted for us less than thirty verses later in Luke 1:41ff, which reads:
This was the moment of John’s indwelling of the Holy Spirit, i.e., the moment when the unborn John was essentially “Baptized” into Christ. It was from this point on that he was empowered by God to be Christ’s prophet and precursor, i.e., even from his mother’s womb, for, John’s first ‘prophecy’ was when he leaped inside his mother as she who bore the eternal Word of God (Mary -the New Ark of the Covenant) entered his mother’s home. The unborn John knew this by the power of the Holy Spirit, and his own mother Elizabeth was filled with the Spirit through her unborn son’s prophetic power, inspiring her to prophesy herself and to testify to the fact that Mary bore the Messiah.
They were not one and the same. Elijah and John were two different persons who shared the same Divinely-given prophetic office. That’s a big difference.
See Luke 9:29–31. It is interesting to note that, in the narrative of Luke’s Gospel, John the Baptist is still alive when the Transfiguration takes place.

So, was John both in prison and on the mountain with Jesus and Moses at the same time?
He said that he was not either of them, i.e., not personally.
This is wrong. John denied that he was Elijah personally. He was responding to the Pharisees who were speaking literally. Christ claimed that John was Elijah in the sense that he held the place and office of Elijah and fulfilled the prophecy that “Elijah” (that is, a prophet like Elijah) would come before the Messiah to announce His coming.

I see. So, John was ignorant of who he was??? That is, he was Elijah but he didn’t know it? Some prophet, if that’s the case!

To be sensible, then, one must admit that it is inspired Scripture that records BOTH Christ’s reference to John as Elijah AND John’s denial that he is Elijah in a personal sense. Scripture cannot lie, and does not record lies. John spoke the truth within the context of his exchange with the Pharisees.
Reincarnation is not a Christian or a Mosaic Jewish belief (it is antithetical to both!), therefore, there was no need to address such an impossibility. John was of the seed of Zechariah and born of Elizabeth; he was a Levite and the descendant of Levitical priests. He was a unique creation of God, distinct from Elijah, who was a Tishbite, and not of Levitical descent. Also, Elijah was assumed into heaven
both body and soul. John was born to Elizabeth and developed as a fetus in her womb. So, if John and Elijah are the same person, what happened to Elijah’s original body?? Clearly, the head and neck of John the Baptist, which were cut in twain in the palace of Herod Antipas, were not the same head and neck that Elijah the Tishbite had during his conflicts with Ahab and Jezebel 600 years earlier. And so, your idea that Elijah finally “died” through the martyrdom of the Baptist is, I’m afraid, silly, since the body that Herod killed was clearly not the body of Elijah - the body that was assumed into Heaven without dying. I’d say that you need to seriously re-think your theology here.Your understanding is not the understanding of the ancient, Apostolic Faith or what we see presented in the Bible.