Compare our reading for the day from Mark's Gospel, Chapter 12 verses 28-34 to these readings:
The Ten Commandments - the First Commandment(Exodus Chapter 20, verse 2). You will see that it is not the same as the one in Mark's Gospel given to us by Jesus, and if you read all the Commandments there is nothing about loving one's neighbour.
Deuteronomy Chapter 6, verses 4-5. This is the Shema Yisrael which is recited twice a day by devout Jews, and which contains the words: "You shall love the Lord your God with all your heart, and with all your soul, and with all your might" - an extension of the first of the Ten Commandments. Jesus would have been accustomed to using these words daily. The laws in Deuteronomy are considered by most scholars to be a later writing of those in Exodus.
Leviticus Chapter 19, verse 18b*. This is where the second part of the Great Commandment comes from, and Jesus knowing the Law of Moses has included this.
*18b means the second half of verse 18 (similarly 18a if used, would have meant the first half of the verse).