Question: What is real identity of Rahab (Joshua 2:1)? Was she a prostitute or someone who ran some type of inn (which is why the spies hid there)?
Answer: The Hebrew word “zona” (used to describe Rahab in the above quoted verse) has both meanings: A woman of loose morals, as well as an innkeeper. There is a question as to which definition applies to Rahab.
Consider, however, that being an innkeeper can place a woman in potentially provocative situations with her clientele, making the occupation unsuitable for a modest woman. That may be the meaning here, rather than being a prostitute.
Nevertheless, there was certainly something very special about Rahab—not only did she hide the spies (see Joshua Chapter 2), but she also married Joshua, the leader of the Jewish Nation, after she converted. From their line were born eight of the major prophets.