This is based on a quote from the Greek Septuagint, Deu 6:5, which is the beginning of the Jewish Shema, a prayer observant Jews recite twice daily. Jesus, however, changes it. Neither the Matthew nor Mark versions say "with" heart, soul and mind." This versions says "in." Mark and the original one say "from." The biggest change is to the punchline, the end. The Septuagint version says, "from that power of yours" at the end not "mind," but Jesus makes it "that mind of yours" in both Matthew and James. Jesus thus elevates logic over power. Not only was the noun changed, but the preposition. The word for "mind" is only used by Jesus in the two versions of Matthew and Mark. The word for "power" is common. Both words sound similar.
The pattern of three repeated phrases used here is common for Jesus, but it is common generally in oratory, and in this case, comes from the Old Testament. However, several things are hidden in Greek that do not come out in English. Two of the three keywords here, heart and soul are so interesting they already have their own articles explaining the Greek words' meaning in more detail. The word for "power" is also explained in its own article. However, Jesus only uses the word translated as "mind" here and in the similar but longer version in Mark. very little about the "mind."