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-nominaladj]])