talking from experience
When a person attempts to insult another person, however the insult actually pertains to the person insulting, they are
talking from experience. More specifically this is calling
psychological projection, however a more loose yet
fitting phrase would be "talking from experience".