September 21, TA 3018 is a strange and almost fruitless day, and it serves to heighten the anxiety of the reader as we watch Sauron's tenacity and his treacherous plot unfolding...and Gandalf, it appears, is wasting all this time chasing some horse in Rohan. It is only after one does a little research that one discovers that Shadowfax was so strong and swift that he could indeed outrun the black horses of the Nazgul.
So, even if we didn't know it, Gandalf did have this knowledge and must have understood that if he were to have any chance of finding Frodo before the Enemy could, he would need to befriend this greatest of horses, one of the Mearas.