This speaks of "discretion" and "understanding" as if they were persons who could watch over someone else. Both statements mean basically the same thing. AT: "Because you think carefully and understand what is right and wrong you will be safe" (See: [[rc://en/ta/man/translate/figs-personification]] and [[rc://en/ta/man/translate/figs-parallelism]])
"They" refers to discretion and understanding, which are spoken of as if they were persons who could rescue someone else. AT: "You will know to stay away from what is evil" (See: [[rc://en/ta/man/translate/figs-personification]])
A person no longer doing what is right but deciding to do what is evil is spoken of as if the person stops walking on the correct path and chooses to walk down a dark path. (See: [[rc://en/ta/man/translate/figs-metaphor]])
# who abandon
The word "who" refers to the people who speak perverse things.