The fact of the Twelve Imams after the Prophet of Islam is an order from Allah (SWT). No one has right to say or suggest on any matter which has been decreed by Allah (SWT). Allah Knows every thing including all the future, so, there is no point in putting such questions from us. Allah Knows everything and He is The Absolute Wise, All Knowung, Most Merciful.
Yes. Good deeds especially to parents and relatives prolong lifespan and bad deeds especially against parents and relatives decreases lifespan. In general, good deeds and bad deeds have direct effect on our life quality and lifespan.
Du'a is a very powerful tool whereby a servant implores and supplicates to Allah swt who is our Master.
In order to increase one's life span it has been narrated by the pristine household of the Ahlulbayt a.s. to give charity to the poorpoor and those who are living in impoverished conditions. This noble act and kind gesture is highly recommendrecommended in Islam apart from reciting some particupar Du'as as prescribed by the blessed prophet saw.
Sayyed Ibn Tawus reports a hadith from Imam Ja'far al-Sadiq that if you wish prolongation of the life of your friends, your family members and yourself, recite the following dua:
اَللّهُمَّ صَلِّ عَلى مُحَمَّدٍ وَآلِ مُحَمَّدٍ اَللّهُمَّ اِنَّ رَسُولَكَ الصّادِقَ الْمُصَدَّقَ صَلَواتُكَ عَلَيْهِ وَآلِهِ قالَ اِنَّكَ قُلْتَ ما تَرَدَّدْتُ فى شَىْءٍ أَنَا فاعِلُهُ كَتَرَدُّدى فى قَبْضِ رُوحِ عَبْدِىَ الْمُؤْمِنِ يَكْرَهُ الْمَوْتَ وَاَكْرَهُ مَسآئَتَهُ اَللّهُمَّ فَصَلِّ عَلى مُحَمَّدٍ وَآلِ مُحَمَّدٍ وَعَجَّلْ لِوَلِيِّكَ الْفَرَجَ وَالْعافِيَةَ وَالنَّصْرَ وَلا تَسُؤْنى فى نَفْسى وَلا فى اَحَدٍ مِنْ اَحِبَّتى
اللهم إجعلني ممن طال عمره وزكا عمله
ALLAHUMMA EJ'ALNI MIMMAN TAAL UMROHU WA ZAKA AMALUH
There are good deeds which increase lifespan like : Being very good to your parents and your relatives.