My questions are why is the dwelling that is in the walled city able only to be redeemed during a one year period and that if its not it becomes established for ever and is not returned at the jubilee? Also, in verse 31 the dwellings in villages without walls may be redeemed seemingly without a time period but redeemed at jubilee.
It should be useful to you consider - in this instance - the following comments of ancient Bible scholars, that are Calvin and Adam Clarke. It seems to me they had well understood the difference of treatment between the 'house within a walled town' and a house built outside a walled town (a village in the open country).
John Calvin (bold is mine): "He here distinguishes houses from lands, providing that the power of redemption should not extend beyond a year; and also, that the purchase should hold good even in the jubilee. A second distinction, however, is also added between different kinds of houses, viz., that houses in towns might be altogether alienated, whilst the condition of those in the country should be the same as that of the lands themselves, as being annexed so as to form part of them. As regarded houses fix towns, because they were sometimes burdensome to their owners, it was an advantage that they might pass into the hands of the rich who were competent to bear the expenses of building. Besides, a house does not supply daily food like a field, and it is more tolerable to be without a house than a field, in which you may work, and from the cultivation of which you may support yourself and family. But it was necessary to except houses in the country, because they were appendages to the land; for what use would there be in harvesting the fruits, if you had no place to store them in? Nay, what would it profit to possess a farm which you could not cultivate? for how could oxen plough without any stalls in its vicinity? Since, then, lands without farm-buildings or cottages are almost useless, and they cannot be conveniently separated, justly did God appoint that, in the year of Jubilee, every rural possession should revert to its former owner." (Calvin's Bible Complete Commentary)
Adam Clarke (bold is mine): "A very proper difference is put between houses in a city and houses in the country. If a man sold his house in the city, he might redeem it any time in the course of a year; but if it were not redeemed within that time, it could no more be redeemed, nor did it go out even in the jubilee. It was not so with a house in the country; such a house might be redeemed during any part of the interim; and if not redeemed, must go out at the jubilee. The reason in both cases is sufficiently evident; the house in the city might be built for purposes of trade or traffic merely, the house in the country was built on or attached to the inheritance which God had divided to the respective families, and it was therefore absolutely necessary that the same law should apply to the house as to the inheritance. But the same necessity did not hold good with respect to the house in the city: and as we may presume the house in the city was merely for the purpose of trade, when a man bought such a house, and got his business established there, it would have been very inconvenient for him to have removed; but as it was possible that the former owner might have sold the house rashly, or through the pressure of some very urgent necessity, a year was allowed him, that during that time he might have leisure to reconsider his rash act, or so to get through his pressing necessity as to be able to get back his dwelling. This time was sufficiently long in either of the above cases; and as such occurrences might have been the cause of his selling his house, it was necessary that he might have the opportunity of redeeming his pledge. Again, as the purchaser, having bought the house merely for the purpose of trade, manufacture, etc., must have been at great pains and expense to fit the place for his work, and establish his business, in which himself, his children, and his children’s children, were to labor and get their bread; hence it was necessary that he should have some certainty of permanent possession, without which, we may naturally conjecture, no such purchases ever would be made. This seems to be the simple reason of the law in both cases." (Commentary on the Bible)
Since these laws was originally given by God, we should feel astonished before the wisdom and the love of our Creator regarding the care concerning the well-being of his servants (in this instance, the people of Israel).
Also today, God cares for his servants. We are discerning how?