1)
Why did he say "Nigrashti mi'Neged Einecha"?
1.
Rashi: When they cast me to the sea, I [was sure that I] will die and be expelled from in front of You.
2.
Radak: When they cast me to the sea, I thought that I will die, and I am expelled from Your Hashgachah on me ? You hid Your face and eyes from me. Malbim ? after the fish swallowed me, I see that Your Hashgachah is still on me.
2)
Why did he say "Ach Osif Lehabit El Heichal Kodshecha"?
1.
Rashi: Since You kept me alive all these days, I knew that I will see Your Heichal again. Radak ? it is the place of Nevu'ah and Your Hashgachah. Lehabit is to pray [facing the Heichal].