It depends which of the commentaries you follow, please see your local Mikra'os Gedolos (here or here):
Radak in his introduction to this Mizmor writes that it is a point of dispute as to who said/will say this entire psalm. It is either David or the Messiah:
הודו – בזה המזמור יש מחלוקת בדברי רבותינו ז״ל יש אומרים כי המזמור הזה נאמר על דוד ויש אומרים כי על ימות המשיח נאמר
Commentaries later on take the verses in question as being said by the Jewish people in either of the stories that may be referred to by Radak, or:
Targum has this as a continuation of the conversation between the builders and the sons of Yishai:
בְּבָעוּ מִנָךְ יְיָ כְּדוּן אֲמַרוּ אַרְדִיכְלַיָא בְּבָעוּ מִנָךְ יְיָ אַצְלַח כְּדוּן אֲמַרוּ יִשַׁי וְאִנְתְּתֵיהּ.
“If it please you, O LORD, redeem us now,” said the builders; “if it please you, O LORD, prosper us now,” said Jesse and his wife.
Malbim takes this as referring to general prayer, and applicable always:
אנא – (מתפללים כולם)
א. שיושיעם ה׳ מני צר,
ב. שיצליחם בכל מעשיהם מעתה ועד עולם.
Ibn Ezra and others say that this was said by the Kohanim to the general nation.