In The Hobbit: The Battle Of The Five Armies, Gandalf's staff was broken when he was captured, but after his rescue he somehow got his staff back. How did this happen?
Gandalf's own (original) staff was indeed destroyed when he fought against Sauron at the end of 'The Desolation of Smaug'. As you can see from the footage, it quite literally turned into dust and blew away.
As you can see from this (deleted) scene from the Extended Edition of 'The Battle of the Five Armies', his own staff was then replaced by Radagast the Brown's
"Take this. If what you say is true, then you'll need it more than I"
The staff was damaged, but not destroyed.
Gandalf, to date is seen with five different variations of his staff, three of those as the Grey wizard. . . . After his staff is destroyed by Sauron, he then acquires the staff of Radagast the Brown which he uses in the Battle of the Five Armies. Whilst attempting to use the staff against a troll Gandalf runs into complications when the crystal inserted in the top of the staff fails to respond to his magical incantation. Gandalf then dodges the troll's attacks and attempts a strike with the staff, which also fails to have any effect. Gandalf, eventually, harnesses the power of the staff without the crystal as he is seen to attack Saruman in the Wizard's Duel at Orthanc. Later on, the staff is damaged in the Battle of the Five Armies, and the root like structure on the crown of the staff is completely withered away, leaving Gandalf with the staff seen in The Fellowship of the Ring. - The dubious LOTR wiki
The wiki, while a poorly sourced information font, is supported by visual comparison of the staff.
That is, indeed, same the badly-beaten staff of Radagast the Brown.