The contrast here is between two less than ideal examples, and Climacus is asking which one of the two makes the better of an imperfect situation. The contrast is between two different ways of approaching God: in his example, the pagan approaches God through subjectivity while the pseudo-Christian is content to contemplate the idea of God objectively, in a manner disassociated with the rest of his concrete existence. Climacus responds that it is the pagan, who realizes that he is lost but does not objectively know God and so desperately cries out to his false god to save him, who is closer to the total truth. Again, note that Climacus never says that the pagan prays in truth to the true God, but rather that the pagan is praying to his false god in the right way.
I like this contrast. I feel like the pagan, of course, which is maybe better than feeling like a pseudo-Christian, but which not very good, according to most theologians including Kierkegaard.