وَوَصَّى بِهَا إِبْرَاهِيمُ بَنِيهِ وَيَعْقُوبُ
And this (submission to Allah, Islam) was enjoined by Ibrahim upon his sons and by Yaqub,
means, Ibrahim commanded his offspring to follow this religion, that is, Islam, for Allah.
Or, the Ayah might be referring to Ibrahim's words,
أَسْلَمْتُ لِرَبِّ الْعَالَمِينَ
(I have submitted myself (as a Muslim) to the Lord of the Alamin (mankind, Jinn and all that exists).
This means that these Prophets loved these words so much that they preserved them until the time of death and advised their children to adhere to them after them.
Similarly, Allah said,
وَجَعَلَهَا كَلِمَةً بَـقِيَةً فِى عَقِبِهِ
And he (Ibrahim) made it (i.e. La ilaha illallah (none has the right to be worshipped but Allah alone)) a Word lasting among his offspring, (true Monotheism). (43;28)
It might be that Ibrahim advised his children, including Jacob, Isaac's son, who were present. It appears, and Allah knows best, that Isaac was endowed with Jacob, during the lifetime of Ibrahim and Sarah, for the good news includes both of them in Allah's statement,
فَبَشَّرْنَـهَا بِإِسْحَـقَ وَمِن وَرَاءِ إِسْحَـقَ يَعْقُوبَ
But We gave her (Sarah) glad tidings of Ishaq (Isaac), and after Ishaq, of Yaqub (Jacob). (11;71).
Also, if Jacob was not alive then, there would be no use here in mentioning him specifically among Isaac's children.
Also, Allah said in Surah Al-Ankabut,
وَوَهَبْنَا لَهُ إِسْحَـقَ وَيَعْقُوبَ وَجَعَلْنَا فِى ذُرِّيَّتِهِ النُّبُوَّةَ وَالْكِتَـبَ
And We bestowed on him (Ibrahim), Ishaq and Yaqub, and We ordained among his offspring Prophethood and the Book. (29;27)
and,
وَوَهَبْنَا لَهُ إِسْحَـقَ وَيَعْقُوبَ نَافِلَةً
And We bestowed upon him Ishaq, and (a grandson) Yaqub, (21;72),
thus, indicating that this occurred during Ibrahim's lifetime.
Also, Jacob built Bayt Al-Maqdis, as earlier books testified.
The Two Sahihs recorded that Abu Dharr said,
"I said, `O Messenger of Allah! Which Masjid was built first?'
He said, Al-Masjid Al-Haram (Al-Ka`bah).
I said, `Then?'
He said, Bayt Al- Maqdis.
I said, `How many years later?'
He said, Forty years."
Further, the advice that Jacob gave to his children, which we will soon mention, testifies that Jacob was among those who received the advice mentioned in Ayat above (2;130-132).
Adhering to Tawhid until Death
Allah said,
يَا بَنِيَّ إِنَّ اللّهَ اصْطَفَى لَكُمُ الدِّينَ فَلَ تَمُوتُنَّ إَلاَّ وَأَنتُم مُّسْلِمُونَ
(Saying), "O my sons! Allah has chosen for you the (true) religion, then die not except as Muslims."
meaning, perform righteous deeds during your lifetime and remain on this path, so that Allah will endow you with the favor of dying upon it.
Usually, one dies upon the path that he lived on and is resurrected according to what he died on. Allah, the Most Generous, helps those who seek to do good deeds to remain on the righteous path.
This by no means contradicts the authentic Hadith that says,
إِنَّ الرَّجُلَ لَيَعْمَلُ بِعَمَلِ أَهْلِ الْجَنَّةِ حَتّـى مَا يَكُونُ بَيْنَهُ وَبَيْنَهَا إِلاَّ بَاعٌ أَوْ ذِرَاعٌ فَيَسْبِقُ عَلَيْهِ الْكِتَابُ فَيَعمَلُ بِعَمَلِ أَهْلِ النَّار فَيَدْخُلُهَا
وَإِنَّ الرَّجُلَ لَيَعْمَلُ بعَمَلِ أَهلِ النَّارِ حَتَّى مَا يَكُونُ بَيْنَهُ وَبَيْنَهَا إِلاَّ بَاعٌ أَو ذِرَاعٌ فَيَسْبِقُ عَلَيْهِ الْكِتَابُ فَيَعْمَلُ بعَمَلِ أَهْلِ الْجَنَّةِ فَيَدْخُلُهَا
Man might perform the works of the people of Paradise until only a span of outstretched arms or a cubit separates him from it, then the Book (destiny) takes precedence, and he performs the works of the people of the Fire and thus enters it.
Also, man might perform the works of the people of the Fire until only a span of outstretched arms or a cubit separates him from the Fire, but the Book takes precedence and he performs the works of the people of Paradise and thus enters it.
Allah said,
فَأَمَّا مَنْ أَعْطَى وَاتَّقَى
وَصَدَّقَ بِالْحُسْنَى
فَسَنُيَسِّرُهُ لِلْيُسْرَى
وَأَمَّا مَن بَخِلَ وَاسْتَغْنَى
وَكَذَّبَ بِالْحُسْنَى
فَسَنُيَسِّرُهُ لِلْعُسْرَى
As for him who gives (in charity) and keeps his duty to Allah and fears Him. And believes in Al-Husna. We will make smooth for him the path of ease (goodness).
But he who is a greedy miser and thinks himself self-sufficient. And belies Al-Husna (none has the right to be worshipped except Allah). We will make smooth for him the path for evil. (92;5-10