Jonah had been fleeing from Joppa, Israel, to Tarshish, Spain. The boat was in transit, and we do not know how far he got before the whale swallowed him. Perhaps the whale was making the return trip. Let us say, then, that the parts of three days and three nights were the time (and distance) that Jonah had fled from Israel. In other words, the whale reversed direction from the route the boat was following, and it took that long for Jonah to be vomited out on dry land back where he had started.
Incidentally, while Jonah was alive in the whale’s belly for parts of three days and nights and Jesus was dead for that length of time, there is no problem in trying to tie in their experiences, for emotions and certain experiences should not be technically analyzed. Jesus had the feeling of sheol and absence from God before he died. Jonah’s praying in the whale’s belly is comparable to Jesus’ praying on the Cross, while waves of sheol were encompassing him and he feared perpetual darkness.