Answered by Ustadha Umm Abdullah
I wish to ask a question with a narration. A friend of mine once said that it is permissible for one to join someone observing nafl in jamaah even if one’s intention is to observe faraaid prayer e.g. zuhr prayer.
Thank you for your response. May Allah (SWT) enrich us in knowledge.
In principal, the Salaah of the Imam must be the same status or superior to that of the Muqtadi (follower). 
For example, if the Imam is praying Fardh of Asr which one has already prayed, he may join the Imam in congregation with the intention of it being a Nafl.
However, if the Imam is praying a NaflSalaah, it will not be permissible to pray behind him with the intention of one praying his FardhSalaah.
Only Allah Ta’ala knows best
Written by Ustadha Umm Abdullah
Checked and approved by Mufti Mohammed Tosir Miah
Darul Ifta Birmingham
رد المحتار على الدر المختارج١/ص ٥٥٠