You mean first he tried to seek help from the people and having been disappointed he turned to Allah :swt:...?
It is natural that a human being seeks the lawful means available to themselves, he was given knowledge and wisdom from Allah's presence, he implored his sons (who were falsely crying wolf) to tell the truth, then when he saw no other realistic avenue for justice, he ONLY complained of his hurt and anguish to Allah :swt: - but he did end up still sending his sons to enquire about Yusuf :as: and his brother when they lost BinYameen.
Yusuf :as: too was given wisdom just as Sulaiman :as: had been (and sometimes the son excels the father due to the larger historical knowledge database), he used the avenues available to him and told the cup-bearer to mention him to the king - and this was the means through which Allah :swt: absolved and elevated him to the extent that even his father :saws: acknowledged his superiority and bowed to him.
Trust in Allah :swt: and tie your camel.
If you can't tie your camel - you will inevitably put even more trust in Allah :swt:
-----
Yusuf 12:109
وَمَآ أَرْسَلْنَا مِن قَبْلِكَ إِلَّا رِجَالًا نُّوحِىٓ إِلَيْهِم مِّنْ أَهْلِ ٱلْقُرَىٰٓۗ أَفَلَمْ يَسِيرُوا۟ فِى ٱلْأَرْضِ فَيَنظُرُوا۟ كَيْفَ كَانَ عَٰقِبَةُ ٱلَّذِينَ مِن قَبْلِهِمْۗ وَلَدَارُ ٱلْءَاخِرَةِ خَيْرٌ لِّلَّذِينَ ٱتَّقَوْا۟ۗ أَفَلَا تَعْقِلُونَ
English - Sahih International
And We sent not before you [as messengers] except men to whom We revealed from among the people of cities. So have they not traveled through the earth and observed how was the end of those before them? And the home of the Hereafter is best for those who fear Allah ; then will you not reason?
English - Yusuf Ali
Nor did We send before thee (as messengers) any but men, whom we did inspire,- (men) living in human habitations. Do they not travel through the earth, and see what was the end of those before them? But the home of the hereafter is best, for those who do right. Will ye not then understand?
Yusuf 12:110
حَتَّىٰٓ إِذَا ٱسْتَيْـَٔسَ ٱلرُّسُلُ وَظَنُّوٓا۟ أَنَّهُمْ قَدْ كُذِبُوا۟ جَآءَهُمْ نَصْرُنَا فَنُجِّىَ مَن نَّشَآءُۖ وَلَا يُرَدُّ بَأْسُنَا عَنِ ٱلْقَوْمِ ٱلْمُجْرِمِينَ
English - Sahih International
[They continued] until, when the messengers despaired and were certain that they had been denied, there came to them Our victory, and whoever We willed was saved. And Our punishment cannot be repelled from the people who are criminals.
English - Yusuf Ali
(Respite will be granted) until, when the messengers give up hope (of their people) and (come to) think that they were treated as liars, there reaches them Our help, and those whom We will are delivered into safety. But never will be warded off our punishment from ×-those who are in sin-×.
- a criminal nation -.
Abz
....until - when the messengers despair and feel that they were rejected as liars -there comes to them Our assistance, then We save whom We will, and Our affliction of harm is not turned away from a criminal nation.
Yusuf 12:111
لَقَدْ كَانَ فِى قَصَصِهِمْ عِبْرَةٌ لِّأُو۟لِى ٱلْأَلْبَٰبِۗ مَا كَانَ حَدِيثًا يُفْتَرَىٰ وَلَٰكِن تَصْدِيقَ ٱلَّذِى بَيْنَ يَدَيْهِ وَتَفْصِيلَ كُلِّ شَىْءٍ وَهُدًى وَرَحْمَةً لِّقَوْمٍ يُؤْمِنُونَ
English - Sahih International
There was certainly in their stories a lesson for those of understanding. Never was the Qur'an a narration invented, but a confirmation of what was before it and a detailed explanation of all things and guidance and mercy for a people who believe.
English - Yusuf Ali
There is, in their stories, instruction for x-men-x -those- endued with understanding.
It is not a tale invented, but a confirmation of what went before it, - a detailed exposition of all things,
and a guide and a mercy to any such as believe.
From Quran, Chapter 12, Verses 109-111