John the Baptizer got his understanding of the principle of baptism and his authority, from the teaching that he received from his righteous parents as they taught him from the Holy Scriptures, which then only contained the books of the Old Testament.
This is describing John the Baptizer's mother and father, saying that they were righteous and walked in all of the commandments and ordinances. God, through the power of His Spirit, revealed to John the spiritual principle of baptism—that a people had to be prepared to hear the message of the soon coming Messiah.