Since the New Testament did not exist at the time St. Paul wrote his epistle to St. Timothy, this verse obviously does not refer to the writings we call the New Testament. The word "Scripture" here refers to the Hebrew Scripture, aka the Old Testament.
We know that the New Testament is divinely inspired because the Catholic Church infallibly decreed it so.