For a function $f(x)$ continuous on $[a, b]$ and differentiable on $(a, b)$, we may subtract a linear function if necessary to reduce it to the case of Rolle's Theorem. Namely, let $$ L(x)=f(a)+\frac{f(b)-f(a)}{b-a} (x-a) $$ then $g(x)=f(x)-L(x)$ is also continuous on $[a, b]$ and differentiable on $(a, b)$, and that $g(a)=0=g(b)$. By applying the Extreme Value Theorem on $g(x)$ over $[a, b]$, there exist a maximum and a minimum, at least one of which is in the interior because otherwise $g(a)=g(b)$ would be both the maximum and minimum values, and $g(x)$ would be a constant. Let the extremum in $(a, b)$ be at $c$, and as $g'(c)$ exists, it can not be any value other than $0$. Then it follows that $$ f'(c)=g'(c)+L'(c)=\frac{f(a)-f(b)}{a-b} $$