Jesus engaged the doctors of the law in the traditional style of discussion: question and answers. There were different categories of questions that could be asked and the quality of each question was a keen indicator of understanding. It was therefore a source of amazement that such a young child could have grasped so much of the law and the traditions.
These laws and traditions were later codified into the Talmud and Mishnah which provides an indispensable guide to Jewish thought. It was against this backdrop of traditions and culture that Christ could explain his new teaching in the sermon on the mount.