Extrapolation for Classes of Weights Related to a Family of Operators and Applications