Resonance interaction of magnetoacoustic waves in refracting plasma waveguide