Moriarty also knows Homles well. The two genius have many things in common. They have the same thinking way and the same feeling. They know each other well and want to defeat each other.
The two geniuses have many things in common.Their thought,their feeling.If they were not opponents,perhaps they may be good friends.But there is no such thing as "if".