The account of Rahab and the spies in Joshua 2 doesn't provide the names of the men.
Rahab helped 2 Isrealite spies get into a city. the isrealites saved her and her family in return when they attacked the city.
Rahab
Rahab hid the spies who were sent by Joshua.
rahab
The spies took three days to return to Rahab in the Bible.
Rahab submitted herself to the spies and also helped them get information. This is a show of servant-hood and that is why she was spared.
Rahab helped the two Israelite spys hide when they were spying on Jericho
simply because she feared the God of Israel and knew that He was the God in heaven above and on earth beneath. (Joshua 2:9-11)
Rahab was a Canaanite woman, which means she was of Canaanite nationality. She is best known for helping the Israelite spies in Jericho.
The harlot of Jericho who hid the two spies was Rahab. She assisted the Israelite spies by hiding them on her roof and helping them escape capture. In return for her kindness, the spies promised to spare her and her family when they conquered Jericho.
In the Bible, her name was 'Rahab'. At Joshua chapters 2 through 6, Rahab was instrumental in helping the Israelites in their conquest of Jericho. She hid the two spies that Joshua had sent to spy out the land. And yes, she is the same Rahab mentioned in the lineage of Jesus Christ. Interestingly, Rahab and Bath-sheba were the not Israelite women, but they purified themselves and became Hebrew by marriage. Jesus' earthly mother Mary was the only Jewish woman mentioned in the Bible as an ancestress.