The people who were moved by God's Ruach could write about things they could not know about themselves.
“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. {in old time: or, at any time } (2Pe 1:20-21 AV)
“All scripture is given by inspiration of God, and is profitable for doctrine, for reproof, for correction, for instruction in righteousness:” (2Ti 3:16 AV)
“9 Remember the former things of old: for I am God, and there is none else; I am God, and there is none like me, 10 Declaring the end from the beginning, and from ancient times the things that are not yet done, saying, My counsel shall stand, and I will do all my pleasure:” (Isa 46:9-10 AV)
“When a prophet speaketh in the name of the LORD, if the thing follow not, nor come to pass, that is the thing which the LORD hath not spoken, but the prophet hath spoken it presumptuously: thou shalt not be afraid of him.” (De 18:22 AV)
“And now I have told you before it come to pass, that, when it is come to pass, ye might believe.” (Joh 14:29 AV)
“And when they agreed not among themselves, they departed, after that Paul had spoken one word, Well spake the Holy Ghost by Esaias the prophet unto our fathers,” (Ac 28:25 AV)
“Whom the heaven must receive until the times of restitution of all things, which God hath spoken by the mouth of all his holy prophets since the world began.” (Ac 3:21 AV)
From the reports that have been written down, we can conclude that the honesty of the writers about themself is remarkable. Because of this we can also ensure that the work is completely reliable, also because all the predictions have come out as they were described before.
“And the LORD spake unto Moses and Aaron, Because ye believed me not, to sanctify me in the eyes of the children of Israel, therefore ye shall not bring this congregation into the land which I have given them.” (Nu 20:12 AV)
“And the LORD was angry with Solomon, because his heart was turned from the LORD God of Israel, which had appeared unto him twice,” (1Ki 11:9 AV)
“1 Now the word of the LORD came unto Jonah the son of Amittai, saying, {Jonah: Gr. Jonas }2 Arise, go to Nineveh, that great city, and cry against it; for their wickedness is come up before me. 3 But Jonah rose up to flee unto Tarshish from the presence of the LORD, and went down to Joppa; and he found a ship going to Tarshish: so he paid the fare thereof, and went down into it, to go with them unto Tarshish from the presence of the LORD.” (Jon 1:1-3 AV)
“66 And as Peter was beneath in the palace, there cometh one of the maids of the high priest: 67 And when she saw Peter warming himself, she looked upon him, and said, And thou also wast with Jesus of Nazareth.” (Mr 14:66-67 AV)
“71 But he began to curse and to swear, saying, I know not this man of whom ye speak. 72 And the second time the cock crew. And Peter called to mind the word that Jesus said unto him, Before the cock crow twice, thou shalt deny me thrice. And when he thought thereon, he wept. {when … : or, he wept abundantly, or, he began to weep } (Mr 14:71-72 AV)