It's wrong to be hypocritical.
Jerry is angry because his friend has made the same mistake that he did in the past.
Jerry wants to get through to his friend and push them to change.
Jerry empathizes with his friend and talks to him from experience.
Jerry gets on his friend's case about making such a careless mistake.
Jerry's friend is encouraged to make a different choice than he did.
Jerry's friend thinks he is having double standards and can't take him seriously.