He said the old covenant was obsolete, not the scripture that contained the record of the old covenant. Look at that passage carefully and note that the word covenant has not the same meaning as the word scripture.
Hebrews 8:13 KJV
(13) In that he saith, A new covenant, he hath made the first old. Now that which decayeth and waxeth old is ready to vanish away.
The scripture contains many things, including the Covenant with Israel which is written in the part of scripture that we call the books of Moses. None of the scripture became obsolete or passed into a class of "not scripture." It should be self evident that the books of the Old Testament remain scripture.
Isaiah 28:16 KJV
(16) Therefore thus saith the Lord GOD, Behold, I lay in Zion for a foundation a stone, a tried stone, a precious corner stone, a sure foundation: he that believeth shall not make haste.
1 Peter 2:6 KJV
(6) Wherefore also it is contained in the scripture, Behold, I lay in Sion a chief corner stone, elect, precious: and he that believeth on him shall not be confounded.
2 Peter 1:19-21 KJV
(19) We have also a more sure word of prophecy; whereunto ye do well that ye take heed, as unto a light that shineth in a dark place, until the day dawn, and the day star arise in your hearts:
(20) Knowing this first, that no prophecy of the scripture is of any private interpretation.
(21) For the prophecy came not in old time by the will of man: but holy men of God spake as they were moved by the Holy Ghost.
....
I could add on that Timothy would have had access to the Old Testament, and not the New, and Paul himself called the Old Testament scripture.
2 Timothy 3:15-17 KJV
(15) And that from a child thou hast known the holy scriptures, which are able to make thee wise unto salvation through faith which is in Christ Jesus.
(16) All scripture is given by inspiration of God, and is profitable for doctrine, for reproof, for correction, for instruction in righteousness:
(17) That the man of God may be perfect, throughly furnished unto all good works.
If you consider Paul's writings scripture (as per 2 Peter 3:16 KJV) you may always want to consider that he considered the Old Testament scripture, and valuable to the Christian as well.