Answer: negative reinforcement.
Step-by-step explanation:
The negative reinforcement can occur when a bad stimulus is removed and is replaced by the good behavior. In the process of negative reinforcement a particular kind of negative behavior or action can be controlled by stopping, avoiding and removing the outcomes of the stimulus.
According to the given situation, Stanley is sunburned and again head out for another day at the beach but to avoid the sunlight stimulus he applies the sunscreen to avoid the painful reaction. This is an example of negative reinforcement as the effect of the stimulus is being prevented and tried to be avoided.