These two proverbs in verses 15-16 are addressed to the wicked, but are given for the sake of the righteous. Though the Lord may warn the wicked and his warnings act as a restraint on their wickedness, he does not teach them as his children for they are not among those elect ones who are taught by God, who receive lessons to their eternal profit.
For the righteous this proverb brings comfort that God has not forgotten or abandoned them, but rather is testing them. He has not changed his mind about their being his children, and what he allows for a time in this life is no indication of what will be given them in the future. They fall into temptation, but they are brought to sorrow over their sins and repent. They fail to respond patiently to the incessant opposition of the world to their faith, but ask God for meekness and so inherit the earth. They begin to envy the wicked in the enjoyment of the treasures of this world, but they learn that those things are passing away and the wicked with them. They sin and are disciplined by the Lord, God even using the wicked to punish them, but he restores them again and brings his chastisement to an end, while his punishment of the wicked is only just beginning.