Jesus compares the thoughts of a person to his good or evil treasure. When a good person has good thoughts, he engages in good actions. When an evil person thinks evil thoughts, he engages in evil actions. (See: [[rc://en/ta/man/translate/figs-metaphor]])
Here the good thoughts of a person are spoken of as if they are treasures stored in the heart of that person, and "his heart" is a metonym for something deep inside the person. AT: "the good things he keeps deep inside himself" or "the good things he values very intensely" (See: [[rc://en/ta/man/translate/figs-metaphor]])
Here the evil thoughts of a person are spoken of as if they are evil things stored in the heart of that person, and "his heart" is a metonym for something deep inside the person. AT: "the evil things he keeps deep inside himself" or "the evil things he values very intensely" (See: [[rc://en/ta/man/translate/figs-metaphor]]) (See: [[rc://en/ta/man/translate/figs-metonymy]])
The phrase "his mouth" represents him using his mouth. AT: "what he thinks in his heart affects what he says with his mouth" or "what he values in his heart determines what he says with his mouth" (See: [[rc://en/ta/man/translate/figs-synecdoche]])