Until the amazing fact of dead people being addressed is considered, no sense can be made of Jesus' statement. Corpses in their graves cannot hear. Though we are given something of a clue in the vision of the valley of dry bones that Ezekiel recorded (chapter 37). Those particular symbolic corpses were spoken to, to cause their bones to come together, to cause them to stand up and be clothed in new flesh. Yet they remained dead until the command was given to the four winds to enter into those lifeless bodies when spirit of life entered into them and they could then act as an army. The application is given in that text. The whole house of Israel knew that their symbolic 'bones' were dried up, their hope was gone, and they were cut off. Therefore God commanded Ezekiel to tell them that God was going to open their symbolic graves to bring them out of there back to the land of Israel. At that time, they were captives in Babylon. The vision was symbolic, about spiritual death, then at God's timing, a miraculous coming back to spiritual life, back to the land. "I will put my Spirit in you", God promised "and you will live and I will settle you in your own land. Then you will know that I the Lord have spoken, and I have done it" (vs. 14).
The people who heard Jesus' staggering promise in John 5:24-30 understood the symbolism of Ezekiel's account of the valley of dry bones. Jesus did not need to explain to them about how corpses could hear a voice of command, and respond! They knew there was spiritual truth being taught here. They knew God's people could be displaced, being like corpses as to having no spiritual life even while living physically in a distant land. So, the first critically important point is that while people are alive physically, they can be dead spiritually.
That point is made by Jesus when he says that the time had now come - right there and then - when some would hear his voice of command and respond, even though he called them "dead". Verse 24 has to be considered first, for that is where Jesus speaks of those who hear his word and believe him who sent me not being condemned; having crossed over from death to life. That is the point of time when spiritually dead people will hear his voice. Those who hear will live. And that coming to life, spiritually, was happening that very hour, even as Jesus spoke! Those who literally heard his words and believed him who had sent him (God the Father), would cross over from death to life, that very hour.
This is the spiritual resurrection miracle enacted by the Holy Spirit - granting new life - the new birth - at the point of a person repentantly coming to faith in Jesus Christ. That began to happen throughout Jesus' ministry on earth, which is why he could say that the time for crossing over from death to life both would happen (future tense), and that the hour "has now come" (present tense).
The other thing Jesus then spoke of was the future time when ALL the dead would hear his voice and come forth to judgment. Some would rise to life, others to condemnation (vss 28-29). This referred to the resurrection of the body - but those who had already come to spiritual life had experienced the first resurrection. This is where Revelation 20:4-6 ties it all together.
The souls of those beheaded for their testimony to Christ were already in heaven, ruling with Christ. "The rest of the dead did not come to life until the thousand years were ended" (vs.5). The first resurrection is of those saints in that glory. They are raised to newness of life even before their physical bodies die, and simply step over from time into eternity, from death to life, in an instant. The grave can only hold their physical remains, but their souls are clothed with resurrection bodies on the Day of Resurrection and Judgment.
Here is an explanation written in 1998, dealing with Revelation 20:4-6:
"Here is a first resurrection, and a second death. From which it
follows that there must be - according to the figure - a first death
and a second resurrection. This first resurrection is out of death,
but it does not affect all the dead, because verse 5 states 'The
rest of the dead lived not again until the thousand years were
finished'. Therefore this first resurrection affects some of the dead,
not all of the dead, since the rest of the dead - other than some -
lived not again until after the thousand years were finished. Those
who are of the first resurrection are said to reign with Christ for
this same figurative thousand years..."
"What is meant by this first resurrection? who are they that partake
of it? and when does it take place? The word resurrection means being
raised from the dead, and that there is said to be a 'first'
resurrection evidently gives a spiritual meaning to the term. For
example, what 'death' is it from which a certain number are raised at
the 'first resurrection?' I put it to you that it is the being dead in
trespasses and sins, Ephesians 2:1, 'You being dead in your sins',
Colossians 2:13, The being in 'the body of this death', Romans 8:2,
'When we were dead in sins', Ephesians 2:5, 'To be carnally minded is
death', Romans 8:6. Not to love one's brother. which is to 'abide in
death', 1 John 3:14. To live in pleasure, which is called being 'dead'
while one lives, 1 Timothy 5:6."
"The first resurrection evidently applies to this first death, which
is not the death of the body according to these scriptures. It is the
inward death of the soul. But how is one raised from such a death as
this? Saith Jesus, 'Verily, verily, I say unto you, The hour is
coming' - now mark these next words - 'and now is, when the dead
shall hear the voice of the Son of God: and they that hear shall
live', John 5:25. All his hearers he regarded as dead. At that present
hour - which 'now is' - every person within earshot heard his outward
voice: however he calls them all alike 'the dead'. But of these he
selects a number whom he describes as 'they that hear'. That is,
therefore, hear inwardly, and hear by divine inworking and initiative.
These shall live, though before they had been dead. Then, this must be
the first resurrection, and, by definition, it is interior, it is in
the inward, hidden man of the heart.
"Verily, verily, I say unto you, He that heareth my word, and
believeth ON HIM THAT SENT ME, hath everlasting life, and shall not
come into condemnation; but is passed from death unto life', John
5:24. The body may die, but that is immaterial, the inward life, the
everlasting life, quickened by the voice of the Son of God, abides for
ever, carrying the living soul immediately into the presence of the
Lord: 'and they lived and reigned with Christ for a thousand years',
Revelation 20:4. Why? Because they were partakers of the first
resurrection, hence their bodies just slept, death had no relevance,
they had already passed from death unto life."
"Thus Jesus speaks to those who inwardly heard his voice, in the hour
in which they heard it, 'Verily, verily I say unto you, If a man keep
my saying, he shall never see death', John 8:51. "The Revelation of
Jesus Christ" by John Metcalfe, pp 556-558 (capitals mine).
There is no separation between 'hear' and believe' when you incorporate verse 24 with verse 25. Isolating one verse is not the right thing to do. Verse 24 makes it perfectly clear that the spiritually dead who hear the words of Jesus and who believe the one who sent him (God the Father), are instantly raised - that very hour - to newness of life. They experience the first resurrection. Likewise do those who respond alike over the centuries following. Thus Jesus saying, "the hour is coming - and now is". To hear and believe Jesus is to hear and believe God the Father. Nobody can separate them, or that.