Are you talking about the earlier figure they spotted in chapter 2?
I have gone back in forth on whether that was Gandalf or Saruman in the past but I am now taking the side that it was Saruman... because of this quote. I don't remember this standing out so clearly before:
'Wait a minute!' cried Gimli. 'There is another thing that I should like to know first. Was it you, Gandalf, or Saruman that we saw last night?''You certainly did not see me,' answered Gandalf, 'therefore I must guess that you saw Saruman. Evidently we look so much alike that your desire to make an incurable dent in my hat must be excused.'
'Good, good!' said Gimli. 'I am glad that it was not you.'
Gandalf laughed again. 'Yes, my good Dwarf,' he said, 'it is a comfort not to be mistaken at all points. Do I not know it only too well! But, of course, I never blamed you for your welcome of me. How could I do so, who have so often counselled my friends to suspect even their own hands when dealing with the Enemy. Bless you, Gimli, son of Glóin! Maybe you will see us both together one day and judge between us!'