@Ctalorgraphics answer is a good one, so I will contribute a little extra to that answer.
The important word in Ezra 7:10 is לֵבָב (lebab) which the OP's version translates as "heart". It can mean a variety of things but the idiom is always the inner mind where discipline and will acts. BDB suggests:
4 specific reference to inclinations, resolutions determinations of
the will (characteristic of ׳ל): ׳הכין ל set the mind, with אֶל 1
Samuel 7:3; 1 Chronicles 29:18, לְ2Chronicles 20:33 לדרשׁ2Chronicles
19:3; 30:19; Ezra 7:10; אֶל׳הטה ל Joshua 24:23 (E) 1 Kings 8:58; לדרשׁ
׳נתן ל 1 Chronicles 22:19, compare 2Chronicles 11:16; פנה מעם ׳ל mind
turn away from Deuteronomy 29:17; Deuteronomy 30:17; ׳פ ׳יֵהָפֵךְ ל
Pharaoh's mind was changed Exodus 14:5 (E).
The verb translated "prepared" is כּוּן (kun) in the Hifil perfect form meaning (BDB):
3 direct one's face towards (אֶלֿ) Ezekiel 4:3,7; in moral and
spiritual sense, direct one's step (צַעֲדוֺ) = order aright, Jeremiah
10:23 (see above), Proverbs 16:9, so (מְּעָמַי) Psalm 119:133;
אֱלֹהָיו ׳הֵכִין דְּרָכָיו לִפְנֵי י2Chronicles 27:6, also (followed
by דרכיו only) Proverbs 21:29 Kt (Qr יָבִין); עַל הַהֵכִין הָאֱלֹהִים
לָעָם2Chronicles 29:36 that which God had ordered aright for the
people (on article = relative pronoun see Ges§ 138. 3. b); followed by
לֵב Job 11:13; Psalm 78:8; + לְ, ׳לֹא הֵכִין לִבּוֺ לִדְרוֺשׁ
אֶתיֿ2Chronicles 12:14, so 2 Chronicles 19:3; 30:19; + ׳לִדְרוֺשׁ
אֵתאתּוֺרַת י Ezra 7:10; הכין לבב ׳אֶלֿ 1 Samuel 7:3 direct the heart
towards ׳י, 1 Chronicles 29:18 (׳י subject), so (with לֵאלֹהִים) 2
Chronicles 20:33; hence (no object expressed) = give attention,
followed by infinitive Judges 12:6.
That is, Ezra had made a firm decision to discipline his mind and life to do this task. The Cambridge commentary suggests:
‘Had set his heart’. A not uncommon phrase, cf. 2 Chronicles 12:14; 2
Chronicles 19:3; 2 Chronicles 30:19. In every instance the R.V. has
rightly changed ‘prepare his heart’ to ‘set his heart’. The idea of
the original is not ‘preparedness for the unforeseen’, but ‘fixity and
stability of purpose’. Compare the expression ‘my heart is fixed’
(Psalm 57:7; Psalm 108:1; Psalm 112:7) where the same verb occurs.
The Jamieson-Fausset-Brown Bible Commentary says:
- Ezra had prepared his heart to seek the law of the Lord, &c.—His reigning desire had been to study the divine law—its principles,
institutions, privileges, and requirements; and now from love and
zeal, he devoted himself, as the business of his life, to the work of
instructing, reforming, and edifying others.
That is, Ezra the scribe had trained and disciplined himself in the language and laws of the Scripture in order to teach and preserve the Bible (we owe him a lot even today!) Thus, some versions correctly translate Ezra 7:10 as:
- NIV: For Ezra had devoted himself to the study and observance of the Law of the LORD, and to teaching its decrees and laws in Israel.
- NLT: This was because Ezra had determined to study and obey the Law of the LORD and to teach those decrees and regulations to the people of Israel.
- CEV: This was because Ezra had determined to study and obey the Law of the LORD and to teach those decrees and regulations to the people of Israel.
- NET: Now Ezra had dedicated himself to the study of the law of the LORD, to its observance, and to teaching its statutes and judgments in Israel.
UPDATE: "The Law of the LORD"
The second part of the question involves just what Ezra devoted himself to studying, namely, "The Law of the LORD". This phrase occurs regularly in the OT, eg, Ps 19:7, 1:2, 119:1, Amos 2:4, etc. In this context, it probably the Torah.
However, as used in Ezra and the contemporary literature, it probably refers more specifically to "The Book of the Law of the LORD" which is the book of Deuteronomy. It was this specifically that was found by Hilkiah the priest and plays a significant part in the Judah's royal history.
It was important because it often refers to the Israelite Covenant (Deut 4:13, 23, 31, 5:2, 3, 7:2, 9, 12, 8:18, 9:9, 11, 15, 10:8, 17:2, 29:1, 9, 14, 21, 31:9, 16, 20, 26, 33:9) and is a re-statement and expansion of the Moral Law based around the 10 Commandments. The centrality and importance of the book of Deuteronomy can be gauged by the requirement for each king of Israel to personally write out a copy of the book and keep it with him (Deut 17:18).
This book of the Law of the Lord is regularly referenced as such:
- Neh 9:3 - They stood where they were and read from the Book of the Law of the LORD their God for a quarter of the day, and spent another quarter in confession and in worshiping the LORD their God.
- 2 Chron 17:9 - They taught throughout Judah, taking with them the Book of the Law of the LORD. They went throughout the towns of Judah and taught the people.
- 2 Chron 34:14 - While they were bringing out the money that had been taken into the house of the LORD, Hilkiah the priest found the Book of the Law of the LORD written by Moses.
Thus, Ezra's devotion to this book of the law of the LORD his God, was simply to re-establish the ancient Israelite spirituality and true religion as defined by the ancient prophets, particularly in the book of Deuteronomy.
It was on this very point that many of Israel's ancient problem began, eg, 2 Chron 12:1, 35:26, 1 Chron 16:40, 22:12, Amos 2:4, Josh 24:26, Jer 8:8, 2 Kings 10:31, etc.