This was before John was put in prison.
Herod had arrested John. He had tied him up and put him in prison because of Herodias. She was the wife of Herod’s brother Philip.
John had been put in prison. When Jesus heard about this, he returned to Galilee.
In fact, it was Herod himself who had given orders to arrest John. He had him tied up and put in prison. He did this because of Herodias. She was the wife of Herod’s brother Philip. But now Herod was married to her.
John was also baptizing. He was at Aenon near Salim, where there was plenty of water. People were coming and being baptized.