I find hard to interpret "A 40 yo learned something from a 13 yo" in a non ageist way. Seems that people disagree, but nobody has provided a counterpoint.
Actually, the comment in question would have been perfect encouragement in my view just by removing that phrase.