Effects of confined longitudinal optical phonons on the binding energy of the impurity in a quantum well