Having conducted a number of searches online (in both Hebrew and English), I've come to the conclusion that this quote is likely a paraphrase of something, and not a straight translation of anything. My suspicion is that it refers to Midrash Tehillim 119:99. The quote in Tehillim (Psalms) to which the midrash refers reads as follows:
מכל מלמדי השכלתי כי עדותיך שיחה לי
Depending on your understanding of the context, that could mean something like,
I have gained more insight than all my teachers, for Your decrees are my study (JPS)
Or,
From all my teachers I grew wise, for Your testimonies are a conversation for me (Artscroll)
That second interpretation is the one adopted by Midrash Tehillim, which reads as follows:
מכל מלמדי השכלתי. מהו מכל מלמדי, צריך אדם שיהיו לו חברים ותלמידים
בתורה שאם שכח דבר אחד שואל לחבריו ומזכירים אותו. וכן הוא אומר טובים
שנים מן האחד. וגם אם ישכבו שנים וחם להם. כי אם יפלו האחד יקים את חברו.
לכך נאמר מכל מלמדי השכלתי
My translation:
"From all my teachers I grew wise". Why, "from all my teachers"?
Because one needs to have friends and students in Torah, so that if he
forgets something he can ask one of his friends [or one of his
students] and they can remind him. This is why it says, "Two are
better than one" (Qohelet 4:9). "And if two lie together they will be
warm" (Qohelet 4:11). "Since if one falls his friend will lift him up"
(Qohelet 4:10). Thus it says, "from all my teachers I grew wise".
The implication here, as per what I added in parentheses, is that one can also ask one's students and that they provide the same degree of educational assistance as do one's colleagues. This sentiment can be found in numerous other places within the rabbinic literature, including other midrashim, Masekhet Avot, Sefer Avot deRebi Natan and the Talmud. It perhaps implies that as one teaches, so one learns, but it doesn't use those words.
If you wanted to say those words in Hebrew, you might say something like, "בזמן שאדם מלמד אחרים כן הוא לומד מהם", but I will leave it to somebody with a poetic bent to come up with a better translation. It's not a phrase that I've personally seen.