וְחִשַּׁב֙ אֶת־שְׁנֵ֣י מִמְכָּר֔וֹ וְהֵשִׁיב֙ אֶת־הָ֣עֹדֵ֔ף לָאִ֖ישׁ אֲשֶׁ֣ר מָֽכַר־ל֑וֹ וְשָׁ֖ב לַאֲחֻזָּתֽוֹ׃
then let him count the years of the sale thereof, and restore the overplus unto the man to whom he sold it; and he shall return unto his possession.
Read halakhic rulings (Jewish law) on Leviticus 25:27: and classical halakhic sources.