As some have mentioned already, it is just not known what specific texts the author of 2 Timothy considered to be "holy Scriptures" (3:15). Certainly it included the Torah, the Prophets, and other time-honored Scriptures that the Church came to accept as canonical. But there is no reason to assume that the author's Bible was identical to our present-day canon, and in fact the author suggests strongly that he considered other works as "inspired Scripture" which are not part of our Bible today.
The phrase usually translated "all scripture is inspired of God" (pasa graphé theopneustos), with an anarthrous graphé "scripture," may be understood as "each and every scripture is inspired of God" or "the whole of scripture is inspired of God"; cf. pasa prophéteia graphés in 2 Peter 1:20. In other words, the phrase has as its scope the totality of graphé "scripture" and makes a blanket statement that all of it is "God-breathed" and useful for didactic purposes, without exception. Since other early Christian writings referred to apocryphal and pseudepigraphal writings as graphé (e.g. 1 Corinthians 2:9, James 4:5, 1 Clement 23:3, Barnabas 16:5, Hermas, Vision 2.3.4), the use of pasa in 2 Timothy 3:16 would seem to legitimize these extrabiblical graphé as "inspired of God" and "beneficial for teaching and reproving". In fact, Tertullian quoted 2 Timothy 3:16 to support his belief that the book of 1 Enoch was genuine, inspired Scripture (De Cultu Feminarum, 1.3), and even the NT quotes 1 Enoch as divinely-inspired "prophecy" (Jude 14-15, quoting 1 Enoch 1:9).
Within 2 Timothy and the other Pastorals, there are a number of indications that extracanonical works (i.e. from a later standpoint, of course) were used by the author for admonishing and "reproving and setting things straight". The influence of Sirach 25:24 (apo gunaikos arkhé hamartias) can be discerned in 1 Timothy 2:13-14 and the metaphor in 2 Timothy 4:8 was earlier expressed in Wisdom 5:16. There are several divine titles in the Pastorals which derive from the apocrypha ("king eternal" in Tobit 13:7, 11 = 1 Timothy 1:17; "king of kings" in 2 Maccabees 12:15, 13:4 = 1 Timothy 6:15), tho the author did not necessarily use these books directly if the titles were in common use in Christian liturgy. The clearest evidence is the allusion to "Jannes & Jambres" in 2 Timothy 3:8, just a few verses before 2 Timothy 3:16, and the allusion is done to provide an example for "instruction and reproving", i.e. as a moral example. In fact, there is no story in the OT about Jannes and Jambres opposing Moses; this story comes from the apocryphal Book of Jannes and Jambres. Yet the author is using this story exactly the same way he says "all scripture" (pasa graphé) ought to be used. He thus had a rather different idea of what counted as "scripture" than we have today. And that would have been perfectly in line with other early Christians, who widely quoted and used extracanonical stories and texts...often designating them as "scripture" or as "inspired".