Well, that’s a very complex question, and one that has stumped theologians for centuries.
My own thoughts:
Romans 8: 29 appears to say that foreknowledge went before predestination:
“For those whom he foreknew, he also predestinated, in conformity with the image of his Son, so that he might be the Firstborn among many brothers.”
But we may be making an error in assuming that God is bound by a temporal sequence. We’re used to doing things in a linear order (“okay, X is good at physics, so I’ll appoint him as physics teacher” versus “I’ve decided X is going to be a physics teacher, so I’ll train him to be good at physics”), but God may not work that way, since He is outside time.
Second, predestination before foreknowledge appears to contradict Wisdom 11:
*But you are merciful to all, because you can do all, and you dismiss the sins of man because of repentance.
For you love all things that are, and you hate nothing of the things you have made; for you would not have created or established anything that you hated.
For how could anything endure, except by your will? Or what, having been called by you not to exist, would be preserved?
Yet you spare all things, because they are yours, O Lord, who loves souls. *
Third, predestination before foreknowledge is uncomfortably close to both Islam and Calvinism, which are logical but not reasonable.
My own position is similar to that endorsed in the 1911 Catholic Encyclopedia, namely, predestination post praevisa merita:
This view not only safeguards the universality and sincerity of God’s salvific will, but coincides admirably with the teachings of St. Paul (cf. 2 Timothy 4:8), who knows that there “is laid up” (reposita est, apokeitai) in heaven “a crown of justice”, which “the just judge will render” (reddet, apodosei) to him on the day of judgment. Clearer still is the inference drawn from the sentence of the universal Judge (Matthew 25:34 sq.): “Come, ye blessed of my Father, possess you the kingdom prepared for you from the foundation of the world. For I was hungry, and you gave me to eat” etc. As the “possessing” of the Kingdom of Heaven in time is here linked to the works of mercy as a condition, so the “preparation” of the Kingdom of Heaven in eternity, that is, predestination to glory is conceived as dependent on the foreknowledge that good works will be performed. The same conclusion follows from the parallel sentence of condemnation (Matthew 25:41 sq.): “Depart from me, you cursed, into everlasting fire which was prepared for the devil and his angels. For I was hungry, and you gave me not to eat” etc. For it is evident that the “everlasting fire of hell” can only have been intended from all eternity for sin and demerit, that is, for neglect of Christian charity, in the same sense in which it is inflicted in time. Concluding a pari, we must say the same of eternal bliss. This explanation is splendidly confirmed by the Greek Fathers. Generally speaking, the Greeks are the chief authorities for conditional predestination dependent on foreseen merits. The Latins, too, are so unanimous on this question that St. Augustine is practically the only adversary in the Occident. St. Hilary (In Ps. lxiv, n. 5) expressly describes eternal election as proceeding from “the choice of merit” (ex meriti delectu), and St. Ambrose teaches in his paraphrase of Rom., viii, 29 (De fide, V, vi, 83): “Non enim ante prædestinavit quam præscivit, sed quorum merita præscivit, eorum præmia prædestinavit” (He did not predestine before He foreknew, but for those whose merits He foresaw, He predestined the reward). To conclude: no one can accuse us of boldness if we assert that the theory here presented has a firmer basis in Scripture and Tradition than the opposite opinion.