"For whatever was written in earlier times was written for our instruction, so that through perseverance and the encouragement of the Scriptures
we might have hope."
Paul can only be speaking of the Old Testament here. He had just quoted from Psalm 69. What was written then was not just for that time, it was written for our instruction as well. "All Scripture is inspired by God and profitable for teaching, for reproof, for correction, for training in righteousness;" (2 Timothy 3:16). When we study Scripture we see God's perspective on things and find wisdom to deal with the trials and challenges that come into our life. We learn how others persevered through hardship and persecution, and came out stronger in their faith and trust in God. This is the encouragement we need to give us hope in hopeless situations. "You won’t find any hope in the daily newspaper. You won’t find any hope in modern literature. Look at any field and see if you can find any hope. There is none whatsoever. It is dark and dismal when you look out at this world today. My friend, the only place you can find real hope is in the Word of God." (J. Vernon McGee)