These two hadeeths are explaining what one should say when one alights on a journey. As in the hadeeth of Khaulah bint Hakim - may Allah be pleased with her, the Prophet ﷺ said: 'Whoever alights somewhere and says: Audhu bi Kalimaatil-lahi At-taamat min sharri ma khalaqa (I seek refuge with the Perfect Words of Allah from the evil of what He has created), nothing will harm him until he leaves that place.'
Regarding his statement: 'Whoever alights somewhere', it encompasses anyone who disembarks at a place to rest, eat breakfast or supper, sleep or for other reasons. Whenever he alights, he should
say: Audhu bi Kalimaatil-lahi At-taamat min sharri ma khalaqa (I seek refuge with the Perfect Words of Allah from the evil of what He has created). The meaning of seeking refuge is to seek protection with the Perfect Words of Allah which include His Universal Words and His Legislative Words. He- Honored and Glorious is He - alluded to His Universal Word in His statement:
“Verily, His Command, when He intends a thing, is only that He says to it, “Be!” – and it is!” (Ya-Sin: 82)
So, Allah protects you with His Universal Word. He averts from you what could harm you when you utter this statement: ‘I seek refuge with the Perfect Words of Allah from the evil of what He has created.’
His Legislative Words are the revelations. They contain fortification from all evil: protection from evil before it occurs and after its occurrence.
As for before its occurrence, it is established from the Prophet ﷺ that whoever recites Ayat Al-Kursi (Qur’an 2 verse 255) at night, there will not cease to be a guard from Allah over him and Satan will not come close to him till the morning.(1)
As for after the occurrence of evil, it is established from the Prophet ﷺ, that when Al-Fatihah (Qur’an Chapter 1) is recited upon an ailing person or upon one stung, it benefits him. Indeed, the companions recited it upon the leader of a people who was stung. He got up as if he just broke loose from a halter, that is, he recovered. This is because the Qur’an is a healing:
“O mankind! There has come to you a good advice from your
Lord (i.e. the Qur'an, orering all that is good and forbidding all that evil), and a healing for that (disease if ignorance, doubt, hypocrisy and differences, etc.) in your breast, - a guidance and a mercy (explaining lawful and unlawful things, etc) for the believers." (Yunus: 57)
So, O Muslim brother, whenever you alight at a place, on the land or at sea, in a house or other places, you should hasten to say: 'I seek refuge with the Perfect Words of Allah from the evil of what He created.' Verily, nothing will harm you till you depart from that place.
Allah alone grants success.