The Gemarah Baba Metzia 75b staes:
תניא ר"ש בן יוחי אומר מנין לנושה בחבירו מנה ואינו רגיל להקדים לו שלום שאסור להקדים לו שלום ת"ל (דברים כג, כ) נשך כל דבר אשר ישך אפילו דיבור אסור
It is taught in a baraita that Rabbi Shimon ben Yoḥai says: From where is it derived with regard to one who is owed one hundred dinars by another, and the borrower is not accustomed to greeting that lender, that it is prohibited to start greeting him after being granted the loan? The verse states: “Interest of any matter [davar] that is lent with interest” (Deuteronomy 23:20), which can also be read as indicating that even speech [dibbur] can be prohibited as interest.
This is called "Ribbis Devarim", Ribbis of words, and although prohibited, (and according to some poskim min-Hatorah), it is a more lenient type of ribbis. For example regular ribbis is forbidden even after the loan was paid back, if given explicitly as payment for the loan, ribbis devarim is only forbidden as long as the loan is yet unpaid.
The Rambam in Hilchos Malveh V'Loveh 5:12 writes:
מי שלוה מחבירו ולא היה רגיל מקודם להקדים לו שלום אסור להקדים לו שלום, ואצ"ל שיקלסו בדברים או ישכים לפתחו שנאמר נשך כל דבר אפילו דברים אסורים, וכן אסור לו ללמד את המלוה מקרא או גמרא כל זמן שמעותיו בידו אם לא היה רגיל בזה מקודם שנא' נשך כל דבר.
When a person who borrowed money from a colleague would not ordinarily greet him first, it is forbidden for him to greet him first. Needless to say, it is forbidden for him to praise the lender in public or go to his home. These prohibitions are derived from the phrase Deuteronomy 23:20: "All types of neshech"; even words are forbidden.
Similarly, it is forbidden for the borrower to teach the lender Scripture or Talmud throughout the duration of the loan if the borrower was not accustomed to doing so previously,52 as implied by the phrase: "All types of interest."
The Rambam is including the prohibition of the borrower to teach the lender as part ofthe Halacha of ribbis devarim. And it is for this reason that he writes "כל זמן שמעותיו בידו" - that this is only forbidden as long as the loan is yet unpaid, as per the halacha of ribbis devarim.
Question: The halacha (Gemara BM 64b/ Shulchan Aruch Yoreh Deah 166/ Rambam ibid Ch.6 and others) forbids the borrower to rent/work/sell to the lender anything for free or at a discounted rate if he would not do so if the lender had not lent him the money. This is not ribbis Devarim, but standard ribbis derabanan (if not conditioned at the time of the loan).
Why is the borrower teaching the lender when he would not have done so otherwise, different than the above halacha, that it is considered only ribbis devarim?
I can understand why saying greeting a lender is only ribbis devarim, since greetings are not something which have monetary value, and are usually not paid for. But teaching is a job with definite monetary value, so why should it be only considered ribbis devarim?