Tosafos 24b points out that the gemara uses 3 different approaches when dealing with the concept of lifnim mishuras hadin (lmh"d).
A. On 30b the gemara quotes the pasuk of
והודעת להם את הדרך אשר ילכו בה ואת המעשה אשר יעשון: אשר יעשון זו לפנים משורת הדין
B. On 24b the gemara doesn't quote any pasuk.
C. In our gemara the gemara quotes the pasuk of למען תלך בדרך טובים.
Tosafos explains that the pasuk in the torah of אשר יעשון which is the strongest requirement of lifnim mishuras hadin, applies to a situation where everyone else is obligated but this individual is patur such as a zaken v'eino l'fi k'vodo for hashavas aveida. He is required based on this pasuk to be machmir on himself and behave the way others are required to do. But, in a situation where everyone is patur, but it is not a real loss, the obligation is not as severe so the gemara doesn't quote that pasuk (but the rosh quotes the pasuk even in this context). Finally, there is our gemara where there is a significant loss to forgo on the damage and pay the wages, therefore the gemara has to find a source that for tzadikim of Raba bar bar Chana's stature he should be machmir even under those circumstances based on the pasuk in mishlei of למען תלך בדרך טובים.
Even in our gemara the GR"A in his commentary on Mishlei (2:20) points out that he had to return the shirt that he took as compensation for their damaging his barrel based on the pasuk of למען תלך בדרך טובים, but when Rav instructed him that in addition he should pay them their wages he quotes the end of the pasuk וארחות צדיקים תשמור. The Gr"a explains that "tovim" refer to one who does good for others who are undeserving but doesn't give of his own to them. "Tzadikim" refer to people who generously give of their own to undeserving others. Therefore, when Rav told Raba bar bar chana to be mochel on the damage and return the shirt he cited the pasuk of למען תלך בדרך טובי, but when Rav requested even more of him such as paying their wages he quotes the pasuk of וארחות צדיקים תשמור because that is beyond the requirement of tovim - it is something that is only expected of true tzadikim.
B'kitzur there are 4 levels of lifnim mi'shuras hadin.
1. אשר יעשון which applies when others in this situation are chayev.
2. lifnim mishuras hadin when everyone is patur but it is not a major loss to be machmir (which is also a ma'aleh for regular people but not demanded by the pasuk).
3. למען תלך בדרך טובים which applies only to "tovim" because there is a loss.
4. וארחות צדיקים תשמור which applies only to tzadikim who literally give generously of their own to others who are undeserving.