If your Armalite based AEG originally started off with a two piece hopup you will require to remove some material from the lower receiver before you can use a one piece hopup.
Once you the appropriate amount of material has been removed you place the hopup with barrel into the upper and depending on the style of your receiver; either slide the upper onto the lower or install it as per how you normally would put a two piece tabbed receiver back together.
Now which plastic piece are you referring to that protrudes out of your mechbox? Would that be the air nozzle? Would you be able to provide a picture for reference?
"Its only a little bit on fire"