Intermediate-valence state of the Sm and Eu in SmB6 and EuCu2Si2: neutron spectroscopy data and analysis