Do they pray before they repent?
Radak: The verse is out of order. First they must repent, and afterwards praise You, and after praise is Tefilah.
Malbim: Indeed, sometimes Hashem heeds prayer before Teshuvah! There are two kinds of punishments. (a) Hashem actively punishes, e.g. to hand them over to enemies, even if based on nature, Yisrael should overpower - "Eichah Yirdof Echad Elef
Perhaps this is only in Eretz Yisrael. The verses that he cites imply that specifically Eretz Yisrael, Hashem constantly supervises it.
Do they thank Hashem before they repent?
Malbim: "Hodu" is admission. They admit that Hashem justifiably withheld rain, even though they do not know what was their sin, and accept to repent when Hashem will answer them, and inform them what was the sin.
What is the meaning of "Ki Sa'anem"?
Rashi: In order that You answer them. "Ki" is in place of 'Asher'.
Radak: Their sin will testify against them. This is like "Yishma Kel va'Ya'anem" (Tehilim 55:20), "Tavi Shakai Ya'anemi" (Iyov 31:35).