Answer:
The situation described in the question is referred to as the Prisoner's Dilemma.
Step-by-step explanation:
The prisoner's dilemma is an example of a situation in Game Theory.
Game Theory is a subject which can be found under behavioural economics with strong roots in psychology. It is related to the science of decision making in by people and how those decisions affect others. In the simplest of cases, just as is given in the question, the dynamics is between two individuals.
According to the theory, sometimes an equilibrium is reached. This point refers to point in a game or a scenario where the decision by the two individuals is firmed up and as a result, the consequences of such determined.
If the decision by each player is such that it can no longer be changed by any of the players in order to improve their benefits accruable, such decisions are referred to as the Nash Equilibrium.
Cheers!