Praise be to Allah.
The istiaadaha and basmalah are not part of the opening duaa reported from the Prophet (peace and blessings of Allaah be upon him), although they are part of what should be recited at the beginning of the prayer. Aaishah (may Allaah be pleased with her) said: The Messenger of Allaah (peace and blessings of Allaah be upon him) used to open his prayer with takbeer (Allaahu akbar).(Reported by Muslim, no. 498)
As regards saying the istiaadhah and basmalah in the second rakah, the scholars differ on this matter. The basmalah should be recited in every rakah, when reciting al-Faatihah, but it should not be recited aloud, because there is some dispute as to whether it is part of al-Faatihah or not. Those scholars who say that it is not part of al-Faatihah recommend that it should be recited before al-Faatihah in each rakah.
So to be on the safe side, the worshipper should recite the basmalah, silently, in every rakah.
With regard to the istiaadhah, there is no difference among the scholars, all of whom say that it is not part of Soorat al-Faatihah, but there is some discussion among them concerning the aayah (interpretation of the meaning): So when you want to recite the Quran, seek refuge with Allaah [al-Nahl 16:98]
Those who take the aayah at face value say that the istiaadhah should be recited in every rakah, before reciting al-Faatihah and the basmalah. This is the opinion of the Shaafais and is the most correct opinion in their view.(Al-Majmoo, 3/323). Al-Hasan al-Basri, Ataa and Ibraaheem al-Nakhai also recommended taawwudh in every rakah.
Ibn Hazm (may Allaah have mercy on him) favoured this opinion, and it was also reported that Imaam Muhammad ibn Abd al-Wahhaab (may Allaah have mercy on him) mentioned it in Aadaab al-Mashiy ilal-Salaah. This opinion was also favoured by Shaykh al-Islam Ibn Taymiyah (may Allaah have mercy on him)(al-Insaaf 2/74), who said in al-Ikhtiyaaraat: Taawwudh is recommended at the beginning of every recitation. (p.50). This is also the opinion of al-Allaamah al-Albaani.
Some scholars say that it is to be recited at the beginning of the first rakah only, and does not have to be repeated in the other rakahs. This is the opinion of the Hanbalis(al-Insaaf, 2/73). Al-Shawkaani thought that the correct opinion was to recite it in the first rakah only. (Nayl al-Awtaar, 3/39, 139-140).
The Prophet (peace and blessings of Allaah be upon him) used to seek refuge with Allaah when he prayed. He used to say Aoodhu Billaahi min al-shaytaan il-rajeem min hamzihi wa nafkhihi wa nafathih (I seek refuge with Allaah from the accursed Shaytaan, from his evil insinuations).(reported by Abu Dawood). Sometimes he would expand on this and say, Aoodhu Billaahi il-Samee il-Aleem min al-shaytaan il-rajeem min hamzihi wa nafkhihi wa nafathih (I seek refuge with Allaah, the All-Hearing, the All-Seeing, from the accursed Shaytaan, from his evil insinuations). (Reported by Abu Dawood and al-Tirmidhi). And Allaah knows best.