It means: people should know themselves and others at the same time, and measure others' feelings with their own feelings.
These two sentences are about the principles of interpersonal communication. When getting along with others, knowing yourself and knowing yourself is to recognize your own characteristics and be familiar with each other's personality and needs, so that you can get along for a long time. It is not easy to know each other, especially yourself. The difficulty in understanding things is not to see others clearly, but to see yourself clearly, and to know yourself thoroughly is called insight.
Empathy is empathy. Only by understanding others' feelings with your own feelings can you easily resonate with others, understand others, reduce misunderstandings and make the relationship between people more harmonious. Do as you would be done by. This mode of thinking and emotion is the source of the formation of Chinese traditional virtues and the basis for people to live in harmony.