The whole hadeeth revolves around the concept called "Tawakkul" (i.e. putting one's trust on Allah alone).
However, there is permissible and impermissible form of Tawakkul. And we learn the permissible form of tawakkul from the Messenger of Allah (salallahu alayhi wassalam). One of his names is the Prophet (salallahu alayhi wassalam) is al-Mutawakkil (One who depends only on Allah). The Permanent committee of Scholarly Research and Ifta' said:
" We should have Tawakkul to follow the way of Allah's Messenger
(peace be upon him) in this regard as he was the best person who had
Tawakkul. He used to consider other appropriate material means along
with his Tawakkul.So, whoever ignores the material means thinking that
it is sufficient for them to have Tawakkul, contradict the way of
Allah's Messenger (peace be upon him). This type of Tawakkul is not
permissible. Rather, it is recklessness and not a Shary (Islamically
lawful) Tawakkul."
Shaykh al Fawzaan comments in his explanation of al Usool uth Thalaathah:
And we should know that tawakkul does not negate using the means (to
achieve a goal). So the Muslim combines having tawakkul upon Allaah and
utilising the means. However you do not place your tawakkul upon the
means; rather you depend upon Allaah.
Shaykh al Fawzaan comments in his explanation of al Usool uth Thalaathah:
So you plant the seed in the earth; this is the means. However you do
not depend upon your planting and your own action. Rather you have
reliance upon Allaah with regard to the growth of this plant and its
producing fruit and its being kept safe and its being good and
suitable.
So, the advice is you should combine both i.e. do the action that is required and then put the trust in Allah. In your example, Action + Du'a. However, you do not put your trust on your action or the means. Rather, you put your trust on Allah. That is the right way of Tawakkul.
Source: The Meaning of Tawakkul,
Tawakkul and Tawkeel