It refers to people in the flesh, the unregenerate. They cant please God.Refers to acting in the flesh - being carnally minded
and concerns law
Romans 8:7-8 (KJV)
7 Because the carnal mind is enmity against God: for it is not subject to the law of God, neither indeed can be.
8 So then they that are in the flesh cannot please God.
Rahab pleased God
and you have a problem with context