Considering you haven't provided any evidence that someone else owned the planet and gave it to the federation ...
Why would someone have to give it to the Federation? It not like the people living in that single valley ever claimed it.
So here's this unclaimed planet, in this unclaimed area of space (after the Klingon stepped away), and the federation incorperated the entire area into their space.
Picard: "A planet in federation space."