Leviticus 25:26-28
26 If, however, a man has no one to redeem it for him but he himself prospers and acquires sufficient means to redeem it,
27 he is to determine the value for the years since he sold it and refund the balance to the man to whom he sold it; he can then go back to his own property.
28 But if he does not acquire the means to repay him, what he sold will remain in the possession of the buyer until the Year of Jubilee. It will be returned in the Jubilee, and he can then go back to his property.