Guidance is in the Hand of Allah
Question

How can we reconcile between the aayahs/verses (interpretation of the meanings): “Verily, you (O Muhammad) guide not whom you like” [al-Qasas 28:56] and “And verily, you (O Muhammad) are indeed guiding (mankind) to the Straight Path” [al-Shooraa 42:52]?
Praise be to Allah.Allah has created man and given him reason, and He has sent down to him Revelation and sent to him Messengers to call him to the truth and warn him against falsehood. Then He has left him to make his own choice. 
“And say: ‘The truth is from your Lord.’ Then whosoever wills, let him believe; and whosoever wills, let him disbelieve.” [al-Kahf 18:29 – interpretation of the meaning] 
Allah commanded His Messenger Muhammad (peace and blessings of Allah be upon him) to convey the truth to all of mankind. Then they have the choice to do as they wish. If a person obeys, he benefits himself, and if he disobeys, he harms himself, as Allah says (interpretation of the meaning): 
“Say: ‘O you mankind! Now truth (i.e. the Quran and the Prophet Muhammad), has come to you from your Lord. So whosoever receives guidance, he does so for the good of his own self; and whosoever goes astray, he does so to his own loss; and I am not (set) over you as a Wakeel (disposer of affairs to oblige you for guidance).’” [Yoonus 10:108] 
Islam is the religion of the natural state of man (fitrah), the religion of reason and thought. Allah has distinguished the truth from falsehood. He has enjoined all that is good and forbidden all that is evil. He has permitted good things and forbidden evil things. There is no compulsion in religion because the benefits or harms come back upon the created being, not upon the Creator. Allah says (interpretation of the meaning): 
“There is no compulsion in religion. Verily, the Right Path has become distinct from the wrong path. Whoever disbelieves in taghoot (false gods) and believes in Allah, then he has grasped the most trustworthy handhold that will never break.” [al-Baqarah 2:256]  
And Allah says (interpretation of the meaning): 
“Whosoever does righteous good deeds, it is for (the benefit of) his ownself; and whosoever does evil, it is against his ownself. And your Lord is not at all unjust to (His) slaves.” [Fussilat 41:46] 
Guidance is in the hand of Allah. If Allah willed, He could guide all of mankind, for there is nothing that He cannot do on this earth or in the heavens. Nothing happens in His Dominion except that which He wills. 
“Say: ‘With Allah is the perfect proof and argument, (i.e. the Oneness of Allah, the sending of His Messengers and His Holy Books, to mankind); had He so willed, He would indeed have guided you all.’” [al-An’am 6:149 – interpretation of the meaning] 
But in His Wisdom, Allah has created us with the ability to choose, and He has sent down to us guidance and the Criterion. So whoever obeys Allah and His Messenger will enter Paradise and whoever disobeys Allah and His Messenger will enter Hell, as Allah says (interpretation of the meaning): 
“Verily, proofs have come to you from your Lord, so whosoever sees, will do so for (the good of) his ownself, and whosoever blinds himself, will do so to his own harm, and I (Muhammad) am not a watcher over you.” [al-An’am 6:104] 
The Messenger (peace and blessings of Allah be upon him) has no part in guidance; all that he and the Muslims have to do is to explain and convey the message, and show them guidance but they cannot force people to follow it, as Allah said to His Messenger (peace and blessings of Allah be upon him) (interpretation of the meaning): 
“And had your Lord willed, those on earth would have believed, all of them together. So, will you (O Muhammad) then compel mankind, until they become believers?” [Yoonus 10:99] 
And Allah says (interpretation of the meaning): 
“And the duty of the Messenger is only to convey (the Message) plainly.” [al-‘Ankaboot 29:18] 
Guidance to the truth is in the hand of Allah alone and no human being has any share in that, as Allah said to His Messenger (peace and blessings of Allah be upon him) (interpretation of the meaning): 
“Verily, you (O Muhammad) guide not whom you like, but Allah guides whom He wills. And He knows best those who are the guided.” [al-Qasas 28:56]  
Allah guides whomsoever He wills and sends astray whomsoever He wills. He has told us that He guides those who obey Him and turn to Him, as He says (interpretation of the meaning): 
“While as for those who accept guidance, He increases their guidance and bestows on them their piety.” [Muhammad 47:17] 
But whoever disobeys Allah and turns away from Him, Allah will not guide him, as He says (interpretation of the meaning): 
“Truly, Allah guides not him who is a liar, and a disbeliever.” [al-Zumar 39:3] 
Allah is Omniscient and knows what has happened and is happening and what is yet to come. Allah knows the believers and the disbelievers, and what they will do, and He knows what their fate will be in the Hereafter. He has written all this in al-Lawh al-Mahfooz (the Preserved Tablet), as He says (interpretation of the meaning): 
“And all things We have recorded in a Book.” [al-Naba 78:29] 
Allah has created man with the ability to choose, and He has created him able to do both, either believe or disbelieve, as He says (interpretation of the meaning): 
“Verily, We showed him the way, whether he be grateful or ungrateful.” [al-Insan 76:3] 
Man has the choice in terms of his reason only; if he loses his reason by which he is able to distinguish between the alternatives of good and evil, truth and falsehood, then he is not accountable. Hence according to Islamic sharee’ah (law), the pen is lifted from the insane person (i.e., he is not accountable) until he recovers his senses, and from the child until he reaches the age of understanding, and from the sleeper until he wakes up. None of these people are accountable until they gain or recover the reason by which they may distinguish between the alternatives of faith and disbelief, truth and falsehood, and so on. 
Whatever direction a person takes, there will be reward and punishment. If he obeys, there will be Paradise: 
“Indeed he succeeds who purifies his ownself (i.e. obeys and performs all that Allah ordered, by following the true Faith of Islamic Monotheism and by doing righteous good deeds.” [al-Shams 91:9 – interpretation of the meaning] 
And if he disobeys, there will be Hell: 
“And indeed he fails who corrupts his ownself (i.e. disobeys what Allah has ordered by rejecting the true Faith of Islamic Monotheism or by following polytheism, or by doing every kind of evil wicked deed.” [al-Shams 91:10 – interpretation of the meaning] 
The choice of one of these two ways is something about which a person will be questioned by the Lord of the Worlds. Hence it is clear that faith or disbelief, obedience or disobedience, is a matter of personal choice. Allah has made reward and punishment dependent upon this choice: 
“Whosoever does righteous good deeds, it is for (the benefit of) his ownself; and whosoever does evil, it is against his ownself. And your Lord is not at all unjust to (His) slaves.” [Fussilat 41:46] 
Whoever loves Allah and His Messenger (peace and blessings of Allah be upon him) and desires good in this world and in the Hereafter, let him enter Islam, and whoever turns away from that and is content with this world and has no interest in the Hereafter and does not submit, then his abode will be Hell. The individual is the one who will benefit or harm himself. There is no compulsion to choose either.  Allah says (interpretation of the meaning): 
“Verily, this (Verses of the Quran) is an admonition, so whosoever wills, let him take a Path to his Lord (Allah).” [al-Insan 76:29] 
And Allah knows best.