"And Pharaoh charged all his people" (Exodus 1:22): he decreed upon all his people. "Into the river you shall cast him." And why did he decree this decree? This is what is written: "And when they shall say unto you, Seek unto them that have familiar spirits, and unto wizards that peep, and that mutter" (Isaiah 8:19) — they peer but do not know what they peer at, they mutter but do not know what they mutter. They saw that the savior of Israel was to be smitten through water; they arose and decreed, "Every son that is born ye shall cast into the river" — for they did not know that it was over the waters of Meribah [mei merivah, not ordinary water] that he was to be smitten, as it is said, "This is the water of Meribah" (Numbers 20:13). They said that Pharaoh's astrologers saw [it] and erred. And three were in that counsel: Balaam, Job, and Jethro. Balaam, who advised that Israel be killed, was killed; Job, who was silent, was sentenced to sufferings; Jethro, who fled, his sons merited to sit in the Chamber of Hewn Stone.
Why Pharaoh Decreed Drowning and the Three Who Counseled Him
Midrash Aggadah, Exodus 1:22
ויצו פרעה לכל עמו. גזר על כל עמו: היארה תשליכהו. ולמה גזר גזירה זו, הדא הוא דכתיב וכי יאמרו אליכם (בניכם) דרשו אל האבות ואת הידעונים המצפצפים והמהגים (ישעיה ח' י"ט), צופים ואינם יודעין מה הם צופים מהגים ואינם יודעים מה הם מהגים, ראו שמושיען של ישראל לוקה במים, עמדו וגזרו כל הבן הילוד היארה תשלכהו, דלא הוו ידעו דעל מי מריבה הוא לוקה, שנא' המה מי מריבה (במדבר כ' י"ג), אמרו שראו אצטגניני פרעה וטעו, ושלשה היו באותה עצה, בלעם ואיוב ויתרו, בלעם שיעץ שיהרגו את ישראל נהרג, איוב ששתק נידון ביסורים, יתרו שברח זכו בניו לישב בלשכת הגזית: