The phrase "it takes one to know one" means that you can only understand somebody else by understanding yourself and that a greater understanding usually comes after experiencing the same situation.
What is the meaning of the phrase "it takes one to know one"?