There were fourteen generations from Abraham to David. There were also fourteen from David to the exile in Babylonia and fourteen more to the birth of the Messiah.
Herod had earlier arrested John and had him chained and put in prison. He did this because John had told him, “It isn't right for you to take Herodias, the wife of your brother Philip.”
Herod had earlier married Herodias, the wife of his brother Philip. But John had told him, “It isn't right for you to take your brother's wife!” So, in order to please Herodias, Herod arrested John and put him in prison.
But to Herod the ruler, he said, “It was wrong for you to take Herodias, your brother's wife.” John also said that Herod had done many other bad things.