Praise be to Allah, the Lord of the Worlds.
The form of sale mentioned in the above question is called a sale with the option to repurchase and it is an invalid since it may appear lawful, but, in essence, it is usury (Riba). The Fuqaha` have considered it invalid because there is a condition nullifying the sale contract. At-Tabarani narrated in "Al-Mo`jam Al-Waseet" from Amer Bin Sho`aib that the Messenger of Allah (peace and blessings of Allah be upon him): "Forbade conditional sale." Ibn Hajar Al-Haitami said, "In conclusion, every condition negating the terms of valid sale is null and void."{Tohfat Al-Mohtaaj, 4/296].
During its seventh session, the International Islamic Fiqh Academy banned this kind of sale, as it may appear lawful, but, in essence, it is Riba.
In conclusion, the above sale contract is invalid. Therefore, the original owner must take his land back and give the buyer his money (5000JDS). And Allah the Almighty knows best.