The term often used to describe someone who gets upset or angry when others treat them in the same way they treated others is "hypocritical." A hypocritical person is someone who holds others to standards they are not willing to uphold themselves.
For example, if someone lies to others but becomes angry when they are lied to, they are being hypocritical. Similarly, if a person criticizes others for being late but gets upset when others are late for a meeting with them, that would also be considered hypocritical behavior.
Being hypocritical can be seen as unfair and can damage trust in relationships. It's essential to strive for consistency in our actions and treat others with the same respect and consideration that we expect from them.