Species 1 and 2 diverged long ago, allowing their sequences for gene A time to diverge as well. A duplication event occurred recently in species 1 to produce gene B from gene A. Since the duplication is recent, little time has occurred for sequence divergence, leaving the two genes very similar in sequence.
Work Step by Step
The most important facts for deciphering this situation are 1) that gene sequences diverge more and more over time and 2) that orthologous genes are genes in different organisms that descended from a common ancestral gene while paralogous genes are found in the same organism due to gene duplication.