Final answer:
Jim's tendency to excuse his own failure with a situational factor and Sam's failure with a dispositional factor is an example of the actor-observer bias.
Step-by-step explanation:
Jim's judgments regarding his own failure and that of Sam's can be best explained by the actor-observer bias. This cognitive bias describes the tendency to attribute our own behaviors to situational factors while attributing others' behaviors to their dispositions.
In Jim's case, he blamed the difficulty of the math test (a situational factor) for his failure, while attributing Sam's failure in biology to not studying hard enough (a dispositional factor).