Sounds like you need to separate the calculation tasks.
First
Secondtemperature and time it takes to reach the temperature
Thirdbut is then decreased when energy is transfered to the plastic, and to air as well if I can
then how long it takes for the temperature to increase