This verse is from a larger part of Proverbs which describes the spiritual makeup of a righteous person, and it reminds us that when we are living in God’s will, our works will encourage others and help us grow spiritually as well. And, when we help others grow in knowledge and wisdom according to the Word of God, we are wiser for having done so. Just as when you help somebody else study in school, and end up learning the material better for having taught it, you become stronger in your faith as you guide a new person in discovering theirs.
One important point to remember: it is not our works that make us righteous in God’s sight, nor is any Christian somehow “more righteous” than any other. We are saved only by Christ’s great sacrifice for us, and the way we show gratitude for that is to adhere as closely as possible to what God has asked of us. When we start focusing on all the good we think we’re doing, and how awesome we are, then we’re forgetting that God is the source of any goodness and righteousness, not our actions. Pride turns righteousness upside-down, so subtly that sometimes we don’t even recognize it. Let’s not rot the tree of life with our own pride!