In this problem, "x" is the independent variable, "a" is an unspecified constant, and "g(x)" is an unspecified function of x. It may be easier to visualize this if we assign values, so that a=3 and g(x)=sin x. Then we would have\[f(x)=(x-3)\sin x\]and you would be trying to show that f'(3) =sin 3. The problem asks you to show the more generalized answer that works for any constant "a" and any function "g(x)".
You aren't trying to find the limit of f(x). You're trying to find the limit of the difference quotient, which is used in the definition of the derivative. We're used to seeing the difference quotient looking like this:\[\frac{ f(x+\Delta x)-f(x) }{ \Delta x }\]In this case we're interested in the derivative at a specific value of x, namely "a", so you see a different form of the difference quotient being used in the solution. I don't recall whether Prof. Jerison used this version in class, but it works as indicated in the solution provided.