Resurrection of Gandalf the White Wizard
Merry and Pippin first feared the white wizard that Tree Beard was about to consult with but soon after, they discovered the white wizard was Gandalf.
Gandalf asks Treebeard to take care of the hobbits. Gimli, Aragorn and Legolas also entered the Fangorn Forest while they prepared to encounter the white wizard by Eomer’s warning.
Gimli, Aragorn and Legolas finally encountered the white wizard and they’ve tried not to look nor hear to the speech of the white wizard as they though it was Saruman.
Saruman was especially able to tempt people with speech with his magic so the three hunters were prepared. However, the trio Gimli, Legolas and Aragorn found out the white wizard was Gandalf who resurrected from the dead.
Battle of Zirakzigil – Battle between Gandalf and the balrog Durin’s Bane
Gandalf fell with the balrog Durin’s Bane together from the Bridge of Khazad-dum. The balrog and the Gandalf have fallen to the depths of Khazad-dum, however they’ve constantly fought as they climbed the Misty Mountains.
The balrog Durin’s Bane and Gandalf eventually climbed up to the peak of the Zirakzigil where the Tower of Durin stood.
Finally, the balrog Durin’s Bane took a fatal blow from Gandalf’s sword Glamdring also known as the foe hammer. The intense battle between the balrog and Gandalf even destroyed the Tower of Durin. Gandalf also died from the wounds he got from the balrog.
Resurrection of Gandalf – Eru Iluvatar
Gandalf was a maiar sent by the Valars to save middle earth. He was called Olorin in Valinor and the continent Aman and he was called many names such as Incanus, the grey pilgrim, Mithradinr(Mithrandir was called among the elves)
The maiar were also technically immortal, however once their body dies, their soul had to dwell until they recovered their body.
However, Eru or Iluvatar, the all mighty god of Middle Earth that usually never interfered with the history or destiny of Ea(the world of Legendarium is called Ea) resurrected Gandalf as Gandalf the White.
Gandalf still had many tasks for middle earth and Eru(Iluvatar) the all mighty god decided that it wasn’t time for Gandalf to return from middle earth.
Gandalf the white – Iluvatar’s permission to release more power
Gandalf, the wizard became Gandalf the White that symbolized that Gandalf has awakened more power. As a maiar sent to middle earth, Gandalf’s power and magic was limited to protect middle earth from excessive collateral damage.
However, Iluvatar, the god of the Legendarium allowed Gandalf to unleash more of his power and magic as a Maiar.
This was symbolized by Gandalf becoming Gandalf the white. Thus, technically Gandalf’s power was already limited by the will of the Divine but after Gandalf’s first death after the battle with the balrog the god Iluvatar permitted Gandalf to unleash more of his power.
Gandalf’s recovery at Lothlorien
After Iluvatar resurrected Gandalf, Gandalf was still left on the Misty Mountains(possibly naked and not fully recovered).
After days, the lord of the air, the lord of the eagles during the third age Gwahir flew over Gandalf and brought him to Lothlorien. Gandalf would redeem himself while he recovered at Lothlorien and Gandalf even received news of the Fellowship of the Ring that departed before he arrived at Lothlorien.
Gandalf received news of the disbandment of the Fellowship of the Ring and all the members were scattered.
However, Gandalf was still a bit relieved that Frodo Baggins accompanied Samwise Gamgee and both were heading to Mordor to fulfill the mission of the Fellowship of the Ring to destroy the One Ring at Mordor.
Gandalf’s joining Gimli, Legolas and Aragorn – Merry and Pippin’s mission
Gandalf left Merry and Pippin with the ent Treebeard and mentioned that Merry and Pippin will become stones that could cause an avalanche.
Gandalf then joins Gimli, Legolas and Aragorn the three hunters urging them to head for Edoras, the capital of Rohan to release king Theoden from Saruman’s magic.
Shadowfax and the Mearas
Mearas were special horse species of middle earth as they were superior than ordinary horses. The Valar Orome the Valar of hunting brought the first mearas to middle earth. However, the numbers of the mearas reduced and even the horse masters of Rohan, the Rohirrim Eorlingas couldn’t tame the mearas.
Shadowfax was a mearas that was described as a white horse that Gandalf would use and even called the lord of the horses, lord of the mearas.
In the novel, Shadowfax belonged to King Theoden and was given to Gandalf. In the movie, Shadowfax was known as a horse(mearas)that never yielded to men but Shadowfax gave permission to Gandalf to ride him after his resurrection by Iluvatar.