Like unto other Prophets (as) he persevered in his obedience...
Like unto other Prophets (as) he persevered in his obedience to Divine Lordship and passed all tests, including Nimrod's Fire and readiness to sacrifice his son for Allah. He was so perseverant that he was called God's Friend.
In short, the interrogative particle (hamza) in a-‘indahu ("is with him") and am-lam ("is he not") in the blessed Verses 36 and 37 beacons the refutation of a false belief as per which he was aware of the Unseen world and he said that he took the responsibility for his sins. The following Verse is saying that it is recorded in the Scriptures of Moses (as) and Abraham (as) that no one may take the responsibility of others and each and every person stands accountable for his own sins.
The blessed Verses are saying that God Almighty obliterates vices through committing righteous good deeds, forgives sins because of repentance, or turns vices into good, but never makes anyone bear the burden of sins committed by another. In this vein, it is reported that the second caliph ordered a pregnant adulteress be stoned.
Imam ‘Ali (as) objected saying that the fetus in her womb was not supposed to bear the burden of its mother's sin in which he relied on the blessed Verse: "No one shall bear the burden of another." He said: "Be patient until the ruling will be executed after delivery." [^1] The Messenger of Allah (S) aid: "The sins of fornicating parents are not to be borne by the illegitimate children." Then he recited the Verse: "No one shall bear the burden of another." [^2] The blessed Verse 39 reads: "And that man can have nothing but what he strives for." The Arabic word sa‘y designates "move fast rather than run" but it often connotes "strive, make effort," since upon making efforts, rapid movements are being done whether the same aim at doing righteous good deeds or otherwise.