My son, do not forget my teaching: As in Proverbs 2 the teacher of wisdom is speaking to the learner. For My son see Proverbs 1.8. Do not forget is a negative way of saying “Remember!” What is to be remembered is the content of the instruction: “Do not forget all that I have taught you.” Teaching renders the Hebrew word torah, as used in Proverbs 1:8 where the learner was advised not to forsake his mother’s “teaching.” The term should not be translated as “law” in these contexts, even though the law lies behind and supports the teaching given by the wise ones.
But let your heart keep my commandments: Heart, as in Proverbs 2:2, 10, refers to the mind. My commandments was used in Proverbs 2:1 to refer to the instruction given by the teacher of wisdom. The two lines of this verse are parallel, with the same meaning expressed in a negative way in the first line and then in a positive way in the second line. Keep is equivalent to do not forget, that is, it means “remember.” The Hebrew term basically means “guard” or “preserve.” Other translations have “remember,” or "treasure." In other parts of the Old Testament to keep … commandments (in mind) often has the sense of “practice,” “obey,” “put [them] to use,” and some take that to be the meaning here also (“and obey them”).
Reyburn, W. D., & Fry, E. M. (2000). A handbook on Proverbs. UBS handbook series; Helps for translators (70). New York: United Bible Societies.