How do you avoid getting angry at someone when they don’t meet your expectations?

We should all try to practice equanimity. Equanimity means compassion without attachment. If we love our family without any expectations, we will not have expectations and will not get angry. We need to learn to accept what is rather than thinking about what it could be. They say love your kids for who they are and not what you want them to be.

You talked about the degree of suffering changing based on if that person has been helpful in your life. Both people who died suffered the same fate why is it less consequential if the person killed was a stranger?

The person who helped you has done things to make your life easier in some ways. Even then, one commits negative action towards them it has a higher degree of suffering attached to it. Although both a stranger and this person suffered the same fate, it is your actions and your Karma that is important here.