What is the version of the following sentence with correct punctuation?

And when his servants said these words to David he was well pleased to be the soninlaw of the king
And when his servants said these words to David, he was well pleased to be the son-in-law of the king.