How could a poor boy from Nazareth know enough about the law to be able to ask questions deep enough for the council to take notice?
There are a lot of spurious writings about the childhood of Jesus but none of them are the word of God. We may be intrigued by these stories, but rest assured, God has given us everything we need to know about Jesus in the Bible.