Joshua's Rahab lived just before the time the Hebrews settled in the promised land. Ruth's Rahab existed about 10 to 12 generations after her. They can't be the same.
both Rahab of Joshua and Rahab of Ruth is not the same because Rahab is mother-in-law of Ruth..... Rahab is also mentioned in the Gospel of Matthew as one of the ancestors of Jesus......