Yes, if one nation wants to donate some of its land to neighboring countries, I see nothing wrong with this. If one nation wants to help out its neighbor this way, then let it. The act of donating its land could solve some of its own problems while helping out its neighbor.
Yes, a country should be allowed to donate any kind of possession, including land, to other countries. Why wouldn't they? If not, taxpayers in any given nation would have a legitimate grief against any type of foreign aid, including membership in the United Nations. In this particular matter, the land donations in question would most likely be uninhabited anyway.
I don't see any reason why countries shouldn't be able to donate land to other countries. I'm pretty sure this happens all the time in the case of embassies around the world. Of course, the real question is, would we allow China (or another country) to own a large swath of land in the middle of Mexico? I doubt it very much.
As long as both countries are in agreement about the arrangement of land to be donated and it will not be adversely affecting the citizens of either country, there is no reason why countries should be prohibited from donating land to surrounding countries. It should be their decision what they will be doing with their land.