Can a function be differentiable at its endpoints? If not, are these endpoints critical values? 
The reader is asked to identify the function's critical values. Point $x=c$ is a critical value because $f'(c)=0$. Also, points $x=b,d,e$ are critical values because $f'$ is undefined at those points.
Since critical values include points where $f'$ is undefined, would the endpoints $x=a$ and $x=g$ be included? If $f'(a)$ and $f'(g)$ are undefined, then they are considered critical values by definition.
According to this question and this question and this question, a function is still continuous at the endpoints of its domain, which would imply that
(1.) $$\lim_{x \to a^-} f(x) = \lim_{x \to a^+} f(x)$$
(2.) $$\lim_{x \to
    g^-} f(x) = \lim_{x \to g^+} f(x).$$
Continuity is a pre-requisite for differentiability, but not sufficient for differentiability, so we have to be careful. Would it also be correct that
(3.) $$\lim_{x \to a^-} \frac{f(x)-f(a)}{x-a} = \lim_{x \to a^+} \frac{f(x)-f(a)}{x-a}$$
(4.) $$\lim_{x \to g^-} \frac{f(x)-f(g)}{x-g} = \lim_{x \to g^+} \frac{f(x)-f(g)}{x-g}?$$
I don't see why it would be fair to say (1.) and (2.) are true but not (3.) and (4.).
If $f$ is not differentiable at $x=a$ and $x=g$, then these points should be called critical values, since the definition of critical values are points where $f'$ is zero or undefined. This would be advantageous! Careful students looking for local extrema will remember to check endpoints if they are technically considered critical values.
What is the official answer according to real analysis? Thanks for your thoughts!

None of the claimed equalities are true because they simply do not make any sense. Limits are not defined by taking limits from the left and right sides. Rather, limits are based on taking limits from any direction within the domain. If the domain includes a left and right side of a point, then the limit is defined from the left and right sides. If there is only one side, then the limit is defined by that side. This is pointed out in the links you've provided.
In these cases, this is not the case, and we simply have
$$f(a)=\lim_{x\to a}f(x)=\lim_{x\to a^+}f(x)$$
$$f(g)=\lim_{x\to g}f(x)=\lim_{x\to g^-}f(x)$$
$$f'(a)=\lim_{x\to a}\frac{f(x)-f(a)}{x-a}=\lim_{x\to a^+}\frac{f(x)-f(a)}{x-a}$$
$$f'(g)=\lim_{x\to g}\frac{f(x)-f(g)}{x-g}=\lim_{x\to g^-}\frac{f(x)-f(g)}{x-g}$$
whereas the limits from the opposite sides are nothing more than undefined.
It is worth noting that in more general settings, such as the complex numbers or $\mathbb R^2$, there is no notion of left or right sided limits, or perhaps the left and right sides are not the only sides to consider.
