Sorry, the original combine version I wanted to post was deleted after the webpage crashed. Anyways, here is the rough summary of what I had written for the combine version.

Legolas's soul enters his body with the aid of Gandalf, but he finds out that Aragorn was in grave danger and might lose his life. Legolas didn't want that to happen, hence he chose to transfer his powers to Aragorn. Gandalf and King Theoden thought Legolas only transferred some, but in fact, Legolas transferred all, because he didn't want to recover and live happily if his friend were to die. Legolas fainted due to exhaustion and his injuries after he saw Aragorn regain consciousness. Legolas left his friends before he could see the world one last time. However, he remembers that Gandaf told him if he died for a heroic reason, he could choose an instant death or slow death. Legolas chose a slow death, which meant that he would become a mortal, and died eventually when he ages. He finally awakes and Aragorn promised to keep him safe from then on, as Aragorn wanted to repay his friend and wanted his friend to lead a long life.