he thought to himself, saying
"he said to himself"
If this man were a prophet, then he would know who and what type of woman is touching him, that she is a sinner
The Pharisee thought that Jesus was not a prophet because a prophet would not allow a sinner to touch him.