When you use the flags FLAG_ACTIVITY_NEW_TASKand FLAG_ACTIVITY_CLEAR_TASK together, this causes Android to remove all Activity intances in the target task and create a new instance of the target Activity.
The goal of the code you've shown is not clear. If you already have an instance of FirstActivity, why are you creating a new instance of FirstActivity? What is it you are trying to do here? Please give more context.