What's the entire problem?
That's a poorly worded problem, as -21 is a factor of 21, we could say the maximum value of h - g is 3 - (-21) = 24.
Even if we restrict ourselves to positive integral factors, your solution 3 - 1 = 2 is better than the choice given.