Can You Pray Obligatory Prayer behind Sunnah Prayer?
Question

A friend of mine was offering 2 Rak`ahs sunnah after Maghrib in the Mosque, when a new comer joined him for Jamah. My friend didn't know what to do as he was offering the Sunnah and he knew that the new comer was under the impression that he was offering fard. After the prayer my friend was still in the Mosque when the new comer finished his prayer and asked my friend why he had not been reading out loud as it was MAghrib. My friend informed him that he had been reading the Sunnah and therefore could not have read out loud. Could you please clarify with daleel [proof from Hadith/Sunnah] as to what should be done in such a situation where you are offering a Sunnah prayer and someone joins you thinking its Fard?
Praise be to Allah.Offering obligatory prayer behind sunnah prayer 
There is nothing wrong with one who is offering an obligatory prayer to pray behind one who is offering an optional prayer . It is proven that Mu`adh ibn Jabal (may Allah be pleased with him) used to pray `Isha’ with the Prophet (blessings and peace of Allah be upon him), then he would go back to his people and lead them in praying ‘Isha’, and the prayer was optional for him and obligatory for them. 
It was narrated that Jabir ibn `Abdullah (may Allah be pleased with him) said: Mu`adh ibn Jabal (may Allah be pleased with him) used to pray with the Prophet (blessings and peace of Allah be upon him), then he would go to his people and lead them in prayer. And he would recite Al-Baqarah. … The Prophet (blessings and peace of Allah be upon him) said: “Recite ‘By the sun and its brightness’ [Ash-Shams 91:1], and ‘Glorify the Name of your Lord, the Most High’ [Al-A’la 87:1] and the like.” (Narrated by Al-Bukhari, 5755 and Muslim, 465) 
An-Nawawi (may Allah have mercy on him) said: 
“In this Hadith, we see that it is permissible for one who is offering an obligatory prayer to pray behind one who is offering a optional prayer , because Mu‘adh used to offer the obligatory prayer with the Messenger of Allah (blessings and peace of Allah be upon him), so he discharged his duty, then he would pray the second time with his people, so it was voluntary for him and obligatory for them. This is stated clearly elsewhere than in Muslim, and this is permissible according to Ash-Shafa‘i (may Allah have mercy on him) and others.” (Sharh Muslim, 4/181)
Changing intention of prayer after starting it
There is nothing wrong with a person starting his prayer alone and then becoming an Imam when someone else joins him. 
Ibn ‘Abbas (may Allah be pleased with him) said: “I stayed overnight with my maternal aunt. The Prophet (blessings and peace of Allah be upon him) got up to pray at night and I got up to pray with him. I stood on his left and he took hold of my head and made me stand on his right.” (Narrated by Al-Bukhari, 667 and Muslim, 763) 
Imam Al-Bukhari (may Allah have mercy on him) included this report in a chapter entitled: If the imam did not intend to lead others in prayer, then people join him so he leads them in prayer. 
Anas (may Allah be pleased with him) said: The Messenger of Allah (blessings and peace of Allah be upon him) was praying in Ramadan, and I came and stood beside him, and another man came and stood too, until there was a group of us. When the Prophet (blessings and peace of Allah be upon him) realized that I was behind him, he made his prayer brief. (Narrated by Muslim, 1104) 
Some of the scholars said that it is permissible to do this in optional prayers, but not in obligatory prayers. But the correct view is that it is valid in both cases. 
Shaykh Al-Islam Ibn Taymiyah (may Allah have mercy on him) said:
“The correct view is that that is permissible in both obligatory and optional prayers.” (Majmu` Al-Fatawa, 22/258)
Shaykh Ibn ‘Uthaymin (may Allah have mercy on him) said:
“But the correct view is that it is valid in both obligatory and optional prayers . With regard to optional prayers , it is mentioned in the text; with regard to obligatory prayers, what is proven in the case of optional prayers is also proven with regard to obligatory prayers, unless there is evidence to the contrary.” (Ash-Sharh Al-Mumti`, 2/304) 
If you are joined by other people in sunnah prayer, should you recite out loud or quietly?
If a person starts to pray behind a man who has started to offer an optional prayer , as in the case asked about here, then the imam has the choice as to whether he recites out loud or quietly . But if he intended to lead the prayer from the outset, then he should recite out loud, because of the Hadith of Mu‘adh (may Allah be pleased with him) quoted above. 
And Allah knows best.