Recent work by Räsänen and coworkers showed that photolysis of hydrides in rare-gas matrices results in part in formation of novel, rare-gas-containing molecules. Thus, photolysis of HCl in Xe and of H2O in Xe result respectively in formation of HXeCl and HXeOH in the Xe matrices. Ab initio calculations show that the compounds HRgY so formed are stable in isolation, and that by the strength and nature of the bonding these are molecules, very different from the corresponding weakly bound clusters Rg···HY. This paper presents a study of the formation mechanism of HRgY following the photolysis of HY in clusters Rgn(HY). Calculations are described for HXeCl, as a representative example. Potential energy surfaces that govern the formation of HXeCl in the photolysis of HCl in xenon clusters are obtained, and the dynamics on these surfaces is analyzed, partly with insight from trajectories of molecular dynamics simulations. The potential surfaces are obtained by a new variant of the DIM (diatomics in molecules) and DIIS (diatomics in ionic systems) models. Non-adiabatic couplings are also obtained. The main results are: (1) Properties of HXeCl predicted by the DIM–DIIS model are in reasonable accord with results of ab initio calculations. (2) The potential along the isomerization path HXeCl → Xe···HCl predicted by DIM is in semiquantitative accord with the ab initio results. (3) Surface-hopping molecular dynamics simulations of the process in clusters, with “on the fly” calculations of the DIM–DIIS potentials and non-adiabatic couplings are computationally feasible. (4) Formation of HXeCl, following photolysis of HCl in Xe54(HCl), requires cage-exit of the H atom as a precondition. The H atom and the Cl can then attack the same Xe atom on opposite sides, leading to charge transfer and production of the ionic HXeCl. (5) Non-adiabatic processes play an important role, both in the reagent configurations, and at the charge-transfer stage. The results open the way to predictions of the formation of new HRgY species.