Using a variational approach, we have investigated the effects of the magnetic field, the impurity position, and the nitrogen and indium concentrations on impurity binding energy in a Ga1-xInxNyAs1-y/GaAs quantum well. Our calculations have revealed the dependence of impurity binding on the applied magnetic field, the impurity position, and the nitrogen and indium concentrations.