The fact that young Jim experiences the sadness of his friend Abdul when Abdul's dog runs away means that Jim is exhibiting empathy.
The term empathy denotes the ability and capacity to understand and share the feelings of another. It means being aware of the feelings of another and being sensitive to them.