I didn't say that any voluntary transaction is legitimate. Rights can be a complex issue, but your example was solved long ago in several ways, such as with easements.
You won't be able to disprove the legitimacy of the concept of rights with a trite example, it would require a more serious discussion than we'll have here.