Leviticus 25:27
25:27 he is to calculate the value of the years it was sold, refund the balance to the man to whom he had sold it, and return to his property.
Leviticus 25:31
25:31 The houses of villages, however, which have no wall surrounding them must be considered as the field of the land; they will have the right of redemption and must revert in the jubilee.
Leviticus 25:51-53
25:51 If there are still many years, in keeping with them he must refund most of the cost of his purchase for his redemption,
25:52 but if only a few years remain until the jubilee, he must calculate for himself in keeping with the remaining years and refund it for his redemption.
25:53 He must be with the one who bought him like a yearly hired worker. The one who bought him must not rule over him harshly in your sight.