spite
A petty wish to hurt, annoy, or frustrate someone, sometimes at a cost to yourself.
In a sentence
“Out of spite, she gave away the concert ticket she had promised her cousin.”
Change one detail
spite
You refuse to share notes that would help the whole team, only so that a rival will struggle too.
In research, spite means harming someone even at a cost to yourself. Everyday use can mean any petty wish to annoy.
resentment
You share the notes, but you still hope your rival struggles because of how they treated you.
Without the costly act, a lingering grievance remains.
Read the entry for resentment