The first distinction relates to things we might merit by work as an effect of our free will.
Man's meritorious work may be considered in two ways: first, as it proceeds from free-will; secondly, as it proceeds from the grace of the Holy Ghost. If it is considered as regards the substance of the work, and inasmuch as it springs from the free-will, there can be no condignity because of the very great inequality. But there is congruity, on account of an equality of proportion: for it would seem congruous that, if a man does what he can, God should reward him according to the excellence of his power. [ST I-II, Q114, A3; emphasis added]This hearkens back to what we have seen previously - namely, that the infinite gulf between God's greatness and our creatureliness means that there is no possible way that we could ever merit something from God in the sense of imposing a debt upon him by virtue of something that we do. Consequently and contrary to the false opinions of some, we do not say that we can earn our salvation - for we cannot.
The second distinction relates to merit as proceeding from God.
If, however, we speak of a meritorious work, inasmuch as it proceeds from the grace of the Holy Ghost moving us to life everlasting, it is meritorious of life everlasting condignly. For thus the value of its merit depends upon the power of the Holy Ghost moving us to life everlasting according to John 4:14: "Shall become in him a fount of water springing up into life everlasting." And the worth of the work depends on the dignity of grace, whereby a man, being made a partaker of the Divine Nature, is adopted as a son of God, to whom the inheritance is due by right of adoption, according to Romans 8:17: "If sons, heirs also." [ST, op. cit.; emphasis added]So we see that if a man merits eternal life, it is not from himself at all, but rather that merit is from the grace of the Holy Spirit poured out upon him.