I will relate two possibilities and there could be more. The first I would say is the hundreds of prophecies and types saying who Jesus is in the Old Testament. Next would be the voice of the Father three times in the four gospels. All of this I could relate to the witness of God.
Believing in view of this is the key element in these verses we have in view. In believing we have a witness in ourselves. So far I never mentioned the Holy Spirits presence in our lives and this is key. There is the thought of not believing we accused God of lying.
The record is that God has given us eternal life and that life is in His Son. To have this life you need to have His son Jesus Christ. I don't have room here to say that to know Christ is to know we have eternal life. Then we have confidence that if this is true we can have the confidence that we can pray and be heard by God.