Question:
How do we combine between these 2 aayah:

1⃣ – Allah says:
إنك لا تهدي من أحببت ولكن الله يهدي من يشاء
Verily! You (O Muhammad SAW) guide not whom you like, but Allah guides whom He wills. (Surah Qasas 28:56)

2⃣ – yet in another aayah Allah says:

وإنك لتهدي إلى صراط مستقيم
And verily, you (O Muhammad SAW) are indeed guiding (mankind) to the Straight Path. (Surah Shuraa 42:52)

Answer: 

Firstly:
we all know that there are no contradiction / mix up between the the speech of Allaah; Allah has stated:
ولو كان من عند غير الله لوجدوا فيه اختلافا كثيرا
Had it been from other than Allah, they would surely have found therein much contradictions. (Surah Nisaa 4:82)

Secondly:
the scholars generally mention that هداية (guidance) is of 2 types

1: هداية التوفيق / إلهام
This is a type of guidance reserved for Allah Alone, And this is the guidance we ask Allah for in every salah
اهدنا الصراط المستقيم

Not even the Prophet صلى الله عليه is capable of this type of guidance

Hence Why Allah says:
إنك لا تهدي من أحببت ولكن الله يهدي من يشاء
Verily! You (O Muhammad SAW) guide not whom you like, but Allah guides whom He wills. (Surah Qasas 28:56)

As for the second type:
2: هداية الدلالة والإرشاد
This is a type of guidance which Allah has given to all the prophets, and other than them where a person invites and clarifies through good admonition and uses evidences to convince others of the truth –

ultimately the first type of guidance is first and foremost. If that is not given to a person then the 2nd type will be of no benefit to him
As Allah has said:

من يَهْدِ اللَّهُ فَهُوَ الْمُهْتَدِ ۖ وَمَنْ يُضْلِلْ فَلَنْ تَجِدَ لَهُ وَلِيًّا مُرْشِدًا
He whom Allah guides, is rightly guided; but he whom He sends astray, for him you will find no Wali (guiding friend) to lead him (to the right Path). (Surah Kahf 18:17)

sheikh Fawzan mentions that the second type of guidance
الدِّلالة والإرشاد
is a general guidance which Allah has given to everyone

Meaning: Allah has clarified / established the truth upon everyone, As Allah said :

وَأَمَّا ثَمُودُ فَهَدَيْنَاهُمْ فَاسْتَحَبُّوا الْعَمَىٰ عَلَى الْهُدَىٰ فَأَخَذَتْهُمْ صَاعِقَةُ الْعَذَابِ الْهُونِ بِمَا كَانُوا يَكْسِبُونَ

And as for Thamud, We showed and made clear to them the Path of Truth (Islamic Monotheism) through Our Messenger, (i.e. showed them the way of success), but they preferred blindness to guidance, so the Sa’iqah (a destructive awful cry, torment, hit, a thunderbolt) of disgracing torment seized them, because of what they used to earn. (Surah Fussilat 41:17)

 

(Quoted from sheikh fawzan’s explanation of haaiyyah of ibn Abee Dawood)