Local magnetic moment on a Ta impurity diluted in YFe2 and GdFe2: a functional integral approach