1)
What is "Lachpor"?
1.
Rashi: It is to spy (search), like "mi'Sham Chafar Ochel" (Iyov 39:29).
2.
Radak: It is like Lasur
2)
How did the people know that the men who came to Rachav were spies?
1.
Malbim: (a) Yericho was well closed
1
It says so below (6:1), after they knew that spies had come, and after Yisrael crossed the Yarden. Here, verse 5 says that they closed the gate, i.e. initially it was open! Perhaps Malbim means that no one was allowed to enter or leave at night. (PF)