Luke 2:40 And the child grew, and waxed strong in spirit, filled with wisdom: and the grace of God was upon him.
41 Now his parents went to Jerusalem every year at the feast of the passover.
42 And when he was twelve years old, they went up to Jerusalem after the custom of the feast.
43 And when they had fulfilled the days, as they returned, the child Jesus tarried behind in Jerusalem; and Joseph and his mother knew not of it.
44 But they, supposing him to have been in the company, went a day's journey; and they sought him among their kinsfolk and acquaintance.
45 And when they found him not, they turned back again to Jerusalem, seeking him.
46 And it came to pass, that after three days they found him in the temple, sitting in the midst of the doctors, both hearing them, and asking them questions.
47 And all that heard him were astonished at his understanding and answers.
48 And when they saw him, they were amazed: and his mother said unto him, Son, why hast thou thus dealt with us? behold, thy father and I have sought thee sorrowing.
49 And he said unto them, How is it that ye sought me? wist ye not that I must be about my Father's business?
50 And they understood not the saying which he spake unto them.
51 And he went down with them, and came to Nazareth, and was subject unto them: but his mother kept all these sayings in her heart.
52 And Jesus increased in wisdom and stature, and in favour with God and man.
*************************************************************************
The majority of people who have studied the teachings of Jesus - even people who have been taught that his mission was not divine - have been inclined to say that he was a great teacher and that his wisdom was remarkable. Most such people have come to this conclusion by studying the things he taught after his baptism.
In Luke 2 verses 40 to 52, the word “wisdom” is included twice - in verses 40 and 52. One is a reference to his wisdom before his first visit to Jerusalem; The second is a reference to his wisdom after his first visit to Jerusalem. From these references we can venture an educated guess that, at some time in their lives, Luke and Mary were well acquainted with each other; He may even have been her physician when he was not engaged in other work.
The story of the first Passover visit of Jesus to Jerusalem deserves a closer look. This almost certainly occurred when Jesus was in his early teens.
“Joseph and the mother of Jesus” were unaware that he was not with their friends and acquaintances from the area of Nazareth until they had returned “a day’s journey” from Jerusalem. It took them three days to find him again. Then “they found him in the temple, sitting in the midst of the doctors, both hearing them, and asking them questions. And all that heard him were astonished at his understanding and answers.” When Joseph and his mother found him, they, too, were amazed.
The “doctors” mentioned here were, presumably, doctors of the law (see Luke 5:17 and Acts 5:3) - the “law” in this case meaning the first five books of the Bible (known as “Torah” by observant Hebrews and as “Pentateuch” by Greeks and others). These doctors were well acquainted, not only with the books of Moses but with rabbinical teachings that had become a major part of the tradition of the Hebrews over hundreds of years. The teachers were well acquainted with the prophecies that anticipated the glorious reign of a Messiah of the lineage of David.
Later, during the three and a half years of his public ministry, Jesus often quoted scripture:
Matthew 12 At that time Jesus went on the sabbath day through the corn; and his disciples were an hungred, and began to pluck the ears of corn and to eat.
2 But when the Pharisees saw it, they said unto him, Behold, thy disciples do that which is not lawful to do upon the sabbath day.
3 But he said unto them, Have ye not read what David did, when he was an hungred, and they that were with him;
4 How he entered into the house of God, and did eat the shewbread, which was not lawful for him to eat, neither for them which were with him, but only for the priests?
See also Mark 2.
After telling the parable of the wicked husbandmen, Jesus said “Did ye never read in the scriptures, The stone which the builders rejected, the same is become the head of the corner: this is the Lord's doing, and it is marvellous in our eyes?” Matthew 21:42
On the road to Emmaus, Cleopas and his companion - who didn’t recognize Jesus - recounted the recent events that had saddened them considerably. Then Jesus said to them “O fools, and slow of heart to believe all that the prophets have spoken: Ought not Christ to have suffered these things, and to enter into his glory?” And beginning at Moses and all the prophets, he expounded unto them in all the scriptures the things concerning himself. Luke 24
On the occasion of his first visit to the Temple, the questions Jesus was asking the doctors, surely must have made it obvious to the doctors - and to Mary - that his understanding of scripture included things the doctors of the law had failed to seriously consider.
Would to God that more parents would be as diligent in encouraging their children to study the scriptures as what Mary was when Jesus was a child!