All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
We do not know if what you are asking about has actually happened or not, but in general, it should be noted that the righteous predecessors hated being asked questions about what did not take place and they dispraised this act, and they did not answer them. They said: “Leave it until it happens’; and if it happens, then Allah sends someone who deals with them.
Injustice is forbidden and it is darkness on the Day of Judgment. If someone is forced to transgress the wealth of a Muslim and he took it without right, such as the example that you have mentioned in the question, like taking his land unjustly, then he may do so in order to repel harm off himself.
The jurists are of the view that it is permissible to spoil the wealth of others when being coerced to do so while guaranteeing it.
The Fiqh Encyclopedia reads: “Whoever is forced to destroy a Muslim’s money by an order by which he fears for himself or fears for a member among his body members, then he may do so. The jurists differed in opinion about who is liable to guarantee in this case.” [End of quote]
However, he does not own the land by doing that; rather, the land remains the property of its owner. The rule of the scholars is that harm does not invalidate the rights of others.
If someone is forced to cause harm to another person in his body, by killing him, or causing a lesser harm than killing, then it is not permissible for him to do so.
Al-Qurtubi said:
“The scholars agreed in a consensus that whoever is forced to kill another person is not permitted to kill him or violate his honor by whipping him or anything else. He must be patient over the tribulation he is inflicted with, and it is not permissible for him to ransom himself for others, and he should ask Allah for wellness in this worldly life and in the Hereafter.” [End of quote]
In the light of the above, you should know that there are some details about the matter and that the ruling varies according to the circumstances.
Allah knows best.