The main goal of the FAMU experiment is the measurement of the hyperfine splitting (hfs) in the 1S state of muonic hydrogen $Delta E_{hfs}(mu^-p)1S$. The physical process behind this experiment is the following: $mu p$ are formed in a mixture of hydrogen and a higher-Z gas. When absorbing a photon at resonance-energy $Delta E_{hfs}approx0.182$~eV, in subsequent collisions with the surrounding $H_2$ molecules, the $mu p$ is quickly de-excited and accelerated by $sim2/3$ of the excitation energy. The observable is the time distribution of the K-lines X-rays emitted from the $mu Z$ formed by muon transfer $(mu p) +Z rightarrow (mu Z)^*+p$, a reaction whose rate depends on the $mu p$ kinetic energy. The maximal response, to the tuned laser wavelength, of the time distribution of X-ray from K-lines of the $(mu Z)^*$ cascade indicate the resonance. During the preparatory phase of the FAMU experiment, several measurements have been performed both to validate the methodology and to prepare the best configuration of target and detectors for the spectroscopic measurement. We present here the crucial study of the energy dependence of the transfer rate from muonic hydrogen to oxygen ($Lambda_{mu p rightarrow mu O}$), precisely measured for the first time.