What happens to a rejected grace? What happens to the merits of one's prayers for a person who is not ready to accept it or does not accept? Does God use one's prayer for a different individual?
First of all, we have to look at the subject as best we can. There are several points to be taken into consideration here.
What is grace?
Grace is the supernatural gift that God, of his free benevolence, bestows on rational creatures for their eternal salvation. The gifts of grace are essentially supernatural. They surpass the being, powers, and claims of created nature, namely sanctifying grace, the infused virtues, the gifts of the Holy Spirit, and actual grace. They are the indispensable means necessary to reach the beatific vision. In a secondary sense, grace also includes such blessings as the miraculous gifts of prophecy or healing, or the preternatural gifts of freedom from concupiscence.
The essence of grace, properly so called, is its gratuity, since no creature has a right to the beatific vision, and its finality or purpose is to lead one to eternal life. - Catholic Dictionary
Here is what Fr. Reginald Garrigou-Lagrange, O.P., surnamed the Sacred Monster of Thomism has to say on this:
MEANINGS OF THE WORD “GRACE”
There are of course three acceptations of this word “grace” even used in human affairs. For grace (χάρις) originally refers to something, which is not due or is freely bestowed; this meaning is very common in both profane and biblical writings. Hence even in purely human matters the term “grace” has a threefold application, as follows:
The love of benevolence conferring a gift, which is not due; for example, we say: This soldier has the grace of the king.
The gift itself freely bestowed; thus we say: I grant you this grace.
Gratitude for a benefit received; thus: I render you thanks for your benefits.
Moreover, these three significations may be transferred to the supernatural order, whereupon the word grace applies to the following.
The love of benevolence on the part of God, conferring supernatural, life. This love of God is uncreated grace.
The supernatural gift of grace itself freely bestowed and ordained to eternal life; this is created grace, of which we are now treating, whether it is interior or exterior, such as the preaching of the gospel.
Our gratitude to God. - Grace: Commentary on the Summa Theologica of St. Thomas
As Geremia's answer explains to us, the Church has yet to make a decision if efficacious grace can be rejected?
In the seminary, we were taught that when we pray for a soul in purgatory or when a Mass is said for the repose of a soul (in purgatory) and that particular soul is in heaven, God will apply those prayers and merits (of the Mass) to another soul in need.
We might not be able to know for certainty if grace can truly be rejected, but it does seem possible. I would like to give here one example of a possibility that could fit that bill. Perhaps not the best, but it gets the point across. It comes from The Cleaving of Christendom by Warren Carroll, chapter 12, page 626. It contrasts the rejection of faith (as a free gift from God) and the reception of that same gift by others (at the same moment in history).
The conversion of Mexico was by far the greatest and most complete in all missionary history, and Mexico remains one of most Catholic countries in the world today. And most of that conversion [of nine million souls] took place in the years when Henry VIII was taking England out of the Church. What the Church had lost in the old world, she regained in the new.
Prayer and graces are never in vain, God will see to it that they are used and accorded to and by someone in need, even if that grace is one of final repentance on one's deathbed. We may pray for someone's conversion, while not being able to see the promptings of the Holy Spirit at work in that soul. While we can not know if in fact grace has been rejected or not, keep on praying, you may be awakening a future St Augustine of Hippo!