A Different Approach
Under VIRTUES AND VICES in A CATECHISM OF CHRISTIAN DOCTRINE | CATHOLIC TRUTH SOCIETY, Q.3221 reads:
322. Which are the Seven Spiritual Works of Mercy?
[...]
7. To pray for the living and the dead.
Therefore, both ought to be prayed for, and offering Mass is the best way to pray for the living and the dead.
MattGutting's and AthanasiusOfAlex's answers have done a good job explaining some aspects of the Catholic practice and basis.
Catholics are familiar with the following Fatima Prayer:
'O my Jesus, pardon us, and save us from the fire of hell; draw all
souls to heaven, especially those most in need.'
Thus to answer - [b]ased on this difference, is it possible to say which purpose is more important? - I would say the most important would be praying for the one most in need. Thus to me, praying more and with greater intensity (mass, rosary, memorares, etc.) and offering sacrifices and mortifications for a family member, a friend, or a colleague languishing in a gravely sinful life would rank above the holy souls in purgatory whose salvation is assured.
Similarly, with the living, my supplications would focus more on the sick or gravely injured, the unemployed or those in some other material need among those whom I love and I ought to pray for, whilst still saying the customary prayers for others not in their condition.
On the other hand, it is easy to forget to pray for the holy souls in purgatory, among whom may be a family member (natural or Christian e.g. priests and religious in one's life, godparents, etc.), a friend, or a former colleague. Since the holy souls cannot help themselves, in this sense the holy souls in purgatory are most in need.
Perhaps rather than focusing on which is more important, it behooves us to continually pray for the living and the dead without expecting a reward, purely out of love for the LORD and for others for his sake. The LORD is generous, we will be blessed, because [some of those for whom we pray for] cannot repay us. We will be repaid at the resurrection of the just2.
"[S]o whoever strives for his neighbor's salvation first of all
profits himself and afterwards his neighbor." - St. John Damascene
quoted in Supplement to the Third Part, Question 71, Article 4, contra | Summa Theologica.
1. cf. Q.322, Virtues, Gifts of the Holy Spirit and the Counsels | PENNY CATECHISM.
2. cf. Lk 14:13-14.
Endnote
Please note that when praying for the living and the dead, I wrote, family, friends, and [former] colleagues, therefore pointing out that our prayer for others ought to be start with those God has placed by our side beginning with those connected to us by ties of blood and christian faith. For example:
Prayer for Others
O Jesus, have mercy on your holy Church; take care of it.
O Jesus, have pity on poor sinners, and save them from hell.
O Jesus, bless [my spouse and my children], my father, my mother, my brothers and
sisters, and all I ought to pray for, as your Heart knows how to bless
them.
[O Jesus, bless the Pope, the bishops and the priests.]
O Jesus, have pity on the poor souls in purgatory and give them
eternal rest.
- Source - A Simple Prayer Book | Catholic Truth Society