This means that no one is better at finding a wrongdoer than another wrongdoer. So if you do something wrong, then you would know if someone else followed your mistake, or you would know someone with the same quality as yourself, did the same mistake if that makes any sense lmao. The example will help better your understanding.
Zack: You are a two faced bitch!
Clay: It takes one to know one.