There is a certain difference between characters and spiritual dispositions between John and Peter, as noticed already by ancient theologians (like, for instance John Chrysostom /IV c./): John, the beloved disciple, is more contemplative and less ardent, the second feature being somehow conditioned by the first, whereas in Peter ardent love habitually overtakes his mind's contemplation, for which reason he even deserves a rebuke (Matt 16:23), and once even an ironic (almost merging with sarcasm) rebuke (John 13:38). Thus, here also the opposition between John and Peter, when the former did not enter the tomb but contemplatively pondered about what he has seen (βλέπει) until he waited for Peter, whereas the latter immediately rushed inside without any pause, has a clear parallel in John 21:7, when John by the height of his contemplative mind led by Spirit made a necessary inference that the man standing at the shore was the Lord, for who else, indeed, could order swarm of fishes enter the nets if not the Creator of the entire nature? And Peter having received this ready inference from his friend, showed the glowing ardency of his love and outstripped all in it, braking all conventions and swimming towards his Lord faster than all. Thus John showed the heights of spiritual contemplation, Peter - the heights of unconditional self-forgetting love.
Now, here also: what has John believed, what has such a penetrative mind discerned from what he has seen and what inference has he made? What is the object of ἐπίστευσεν, which he purposefully left unwritten, in order to stir contemplative powers of the readers also? It is totally coarse and base interpretation that he just believed what Mary Magdalene has told them; but not only coarse and base, but objectively wrong also, because the empirical fact that Jesus' body was taken away John saw already before Peter's arrival, so there was nothing there to believe in, for he saw with his own two eyes that what Mary has told them was right! The ἐπίστευσεν follows this, so there is a hiatus, a lapse of time, a couple of minutes perhaps, between the βλέπει and ἐπίστευσεν. So, what had John been thinking about while waiting for Peter, and what inference could he make after having seen the linens and the kerchief (σουδάριον)?
Look: there was nobody among Jesus' followers who could steal His body, for everybody was afraid of association with Him, a political criminal, and even if such a super audacious guy would have appeared to dare such a feat as to steal the body of Jesus in front of the Roman guards, such a guy would have come from the closest circle of Jesus, but all of them were hiding in such a fear as even to lock doors (John 20:19), so it was excluded. Jews could not steal Him, for it was absolutely not in their interests; on the contrary, this would have played right into the hands of Jesus' followers, for they could say that He resurrected, and the "last deception would be worse than the first" (Matt 27:64); Romans could not take Him away either, for they were commissioned to protect the body by the Procurator himself. Moreover, even if one would fancy about a super-hero who could venture stealing the body, even such a super-hero in such a dangerous context would have stolen the body in a big haste, that is to say, necessarily taking the body together with the linens in which it was wrapped and together with the kerchief, for to lose perhaps as much as an hour in untying the oil-soaked sticky linens and then even care about laying them apart and bend tidily the kerchief would make even such a super-hero a complete idiot!
Such thoughts must have come to John when he saw what he saw, with the necessary inference expressed by the verb εἶδεν, which applies only to John and not Peter, and the εἶδεν* is different from βλέπει, for the second expressed just the seeing of the empirical fact, whereas the fist the contemplative understanding and vision by the mind's eye that no other inference from the seen could be driven, but that the Lord has resurrected, and this is what he believed, and the "believed" ἐπίστευσεν refers only to John and not to Peter, who did not contemplate about this at that moment.
(* That in John the verb εἶδεν can be used in the meaning of non-physical vision is seen also in John 1:48, when Jesus tells Nathanael that He "saw (εἶδον) him under a fig tree", which was not physically visible from there, that is to say, in this εἶδον Jesus implied that He knew what Nathanael was thinking in his heart under the fig tree, and that explains the response of Nathanael, who affirms Jesus' divinity "Rabbi, your are the Son of God" (John 1:49), for only God can see, i.e. know the heart of man.)
Thus, one can observe a logic of ascent in John from a) seeing the fact that Jesus' body was not there (βλέπει); to b) seeing by mind's eye, that is to say, contemplating the impossibility of any other solution than that the Lord has resurrected (εἶδεν); and, ultimately, c) believing, that is to say, making an emotional or rather devotional self-committment to the light of the truth revealed through the contemplation (ἐπίστευσεν), for any belief not based on the light of contemplation or the voice of conscience - the two being the same - is at worst blind and at best unperfected faith.
Now, the phrase that "they did not yet understand the Scripture that it was due for Him to resurrect from dead", means that before that moment they did not know it, but from this moment onwards John has believed in it, and through him also Peter, just as it happened in the mentioned passage describing the fishing affair, when Peter knew from John that the man at the shore was the resurrected Lord Himself.