I think in this passage, we see a perfect example of someone being as shrewd as serpents as Jesus told his disciples to be in Matthew 10:16.
Surrounded by a pack of wolves, Paul shrewdly divided those who would attack them. How? By claiming his heritage as a Pharisee. He told them,
My brothers, I am a Pharisee the son of a Pharisee. I stand on trial because of my hope in the resurrection of the dead. (23:6)
This was completely true. He was on trial because he believed in the resurrection of the dead, namely Jesus. Of course he didn’t mention the latter part, but by saying what he did, his accusers became divided between those who believed in the resurrection of the dead (the Pharisees) and the those who didn’t (the Sadducees.)
Not only that, one wonders what later impact he might have had on some of the Pharisees who had initially opposed him. For some were saying,
We find nothing wrong with this man…What if a spirit or an angel has spoken to him? (23:9)
The point is, know the people you are talking to. There are people that may oppose you and be utterly hardened toward the gospel. But by knowing who they are, and how they think, God can give you insight in how to turn the tide in their hearts. And with some shrewd words, the seed of the gospel may be planted in their hearts.
So remember the words of Jesus.
I am sending you out like sheep among wolves. Therefore be as shrewd as snakes and as innocent as doves. (Matthew 10:16)