This scenario exemplifies the concept of "cognitive appraisal".
In straightforward terms, a cognitive appraisal is an appraisal of an enthusiastic circumstance wherein a man assesses how the occasion will influence them, translates the different parts of the occasion, and lands at a reaction in light of that understanding.