If David wrote this, he is talking about his son, "the king's son," he is speaking of the time when his son will be king. If Solomon wrote it, even though he is writing about himself, it would be best to translate as though he were writing about someone else. Either way, "May the king judge" is the best translation.
The verb may be supplied from the previous phrase. The adjective "poor" refers to poor people. Alternate translation: "may he judge your poor people" (See: [[rc://en/ta/man/translate/figs-ellipsis]] and [[rc://en/ta/man/translate/figs-nominaladj]])
The psalmist speaks of the people of Israel as if they were the mountains and hills on which they live. He speaks of the mountains and the hills as if they were the entire land of Israel, as if that land were a garden that produces fruit, and of peace and righteousness as if they are that fruit. Alternate translation: "May the people of the land live in peace ... may they do everything in a righteous way" (See: [[rc://en/ta/man/translate/figs-metonymy]] and [[rc://en/ta/man/translate/figs-synecdoche]] and [[rc://en/ta/man/translate/figs-metaphor]])