Context. The dynamics of molecule formation, relaxation, diffusion, and desorption on amorphous solid water (ASW) is studied in a quantitative fashion. Aims. The formation probability, stabilization, energy relaxation, and diffusion dynamics of CO2 and NO2 on cold ASW following atom+diatom recombination reactions are characterized quantitatively. Methods. Accurate machine-learned energy functions combined with fluctuating charge models were used to investigate the diffusion, interactions, and recombination dynamics of atomic oxygen with CO and NO on ASW. Energy relaxation to the ASW and into water internal degrees of freedom were determined from the analysis of the vibrational density of states. The surface diffusion and desorption energetics were investigated with extended and nonequilibrium MD simulations. Results. The reaction probability is determined quantitatively and it is demonstrated that surface diffusion of the reactants on the nanosecond time scale leads to recombination for initial separations of up to 20 Å. After recombination, both CO2 and NO2 stabilize by energy transfer to water internal and surface phonon modes on the picosecond timescale. The average diffusion barriers and desorption energies agree with those reported from experiments, which validates the energy functions. After recombination, the triatomic products diffuse easily, which contrasts with the equilibrium situation, in which both CO2 and NO2 are stationary on the multinanosecond timescale.