I think that there are two things that contribute to making Montag approach the campfire after he has escaped across the river.
First, he must surely be thinking that anyone who is hanging out by a campfire out in the wilderness is a rebel like him. We know that the people in this society all live in the cities. They do things like watching the parlour walls and going to the amusement parks and driving way too fast in their "beetles." They do not sit around campfires out in the middle of nowhere.
Second, as he watches the men, he can see and hear that they are talking. We know that people in the society don't just sit around and talk. Clarisse's family did and they were seen as really antisocial. So these men are doing something that "normal" people would never do. Therefore, they must be rebels like Montag.
For these two reasons, it is clear to Montag that these are rebels like him and will probably want to help him. That's why he approaches them.
In my opinion, I think that he already knew that the people he encountered would be the rebels that Faber had told him about. He knew that if he continued down the tracks, he would eventually encounter those outcasts. Thus he would know when he encountered signs of people that they would be the ones he was looking for. People who are content with the society they live in would not be wandering, homeless, near railroad tracks. Also, Montag had journeyed far without supplies for a long time. He was probably also drawn to the fire by his need of warmth. That's the impression I received when I read this part.