Ion beam therapy is one of the most progressive methods in cancer treatment. Studies of the water radiolysis process show that the most long-living species that occur in the medium of a biological cell under the action of ionizing irradiation are hydrogen peroxide (H$_2$O$_2$) molecules. But the role of H$_2$O$_2$ molecules in the DNA deactivation of cancer cells in ion beam therapy has not been determined yet. In the present paper, the competitive interaction of hydrogen peroxide and water molecules with atomic groups of non-specific DNA recognition sites (phosphate groups PO$_4$) is investigated. The interaction energies and optimized spatial configurations of the considered molecular complexes are calculated with the help of molecular mechanics method and quantum chemistry approach. The results show that the H$_2$O$_2$ molecule can form a complex with the PO$_4$ group (with and without a sodium counterion) that is more energetically stable than the same complex with the water molecule. Formation of such complexes can block genetic information transfer processes in cancer cells and can be an important factor during ion beam therapy treatment.