How can the Midrash claim that Reuvain was the first to do teshuvah when we know that Kayim begged Hashem for leniency for killing Hevel and the Midrash teaches that Kayin then came to Adam and told him what a great thing teshuvah is. This inspired Adam to do teshuvah as well and say “Mizmor shir l’yom haShabbos?” (The question of what the mizmor of Shabbos has to do with the mitzvah of teshuvah is fodder for many a shabbos shuvah derasha.)
The Ksav Sofer answers that Adam and Kayin had nothing to help their case and could only plead for mercy from Hashem. Not so Reuvain. The Midrash presents Reuvain’s teshuvah in the context of his just having stuck his neck out to save Yosef; he had a tremendous zechus in his favor. Reuvain could easily have figured that the good he had done more than offset the bad, or at least the balance sheet was all equal. Nonetheless, Reuvain did teshuvah anyway.
There are no quid pro quo deals with G-d. The credit for the good on one side of the balance sheet does not absolve one of the need for teshuvah for what is on the other side of the balance sheet.