Did Jesus teach the law and the prophets of scripture?
Yes, throughout scripture Jesus refers to the law and the prophets without fail.
Did Jesus endorse people live by the law and the prophets?
Well, if he taught it, he expected obedience to it, otherwise he would be no different to the Pharisees who taught it, yet didn't follow through themselves, with what they taught.
Jesus gives us the story of the rich man and Lazarus and we see the emphasises at the end, for the knowledge of the truth and salvation for the rich man's brothers placed solely on Moses and the prophets. Since Moses and the Prophets were not present in the flesh, their written and oral dictation of their writings were.
So it is clear as day that Jesus expected the living to abide and live by them.