Interaction between two magnetic impurities in a quantum well