Note that the horizontal axis is labeled with values of $g$. However, the slope formula inside the diagram is wrong. It should be $\text{slope}=\frac{f(d)-f(c)}{g(d)-g(c)}$.

For a nice answer to your first question see this answer of Harald Hanche-Olsen considering tangents to the curve $[c,d]\ni t\mapsto(f(t),g(t))$ in relation to the line connecting the end points.

Another way to think about it in view of the pictures: It is assumed that $g'(x)\ne 0$ on $[c,d]$. Assume that the sign is plus. Then $g$ is strictly monotonically increasing, thus invertible and the inverse function $g^{-1}$ is differentiable.

Now apply the simple mean value theorem to $h(t)=f(g^{-1}(t))$,
with $a=g(c)$ and $b=g(d)$,
so that $c=g^{-1}(a)$ and $h(a)=f(g^{-1}(a))=f(c)$ etc.,

$$
\frac{f(d)-f(c)}{g(d)-g(c)}=\frac{h(b)-h(a)}{b-a}=h'(q)=f'(g^{-1}(q))\frac{1}{g'(g^{-1}(q))}=\frac{f'(p)}{g'(p)}
$$
where $q$ is a point in $(a,b)$ and $p=g(q)$ is a point inside $(c,d)$. The crucial step is the application of the chain rule together with implicit differentiation for the derivative of the inverse function.

Notice while this works perfectly well and in accordance with the first picture, the apparatus of an additional scale, additional points and used theorems is much more heavy than the standard proof.

As to the linked answer of Harald Hanche-Olsen, consider the curve $(f(t),g(t))$ in the plane. Then the straight line from $(f(a),g(a))$ to $(f(b),g(b))$ has the parameter equation $(1-s)(f(a),g(a))+s(f(b),g(b))$ and the normal equation
$$
(g(b)-g(a))⋅x-(f(b)-f(a))⋅y=g(b)⋅f(a)-g(a)⋅f(b)
$$
The distance from this line can be measured gy the function
$$
d(x,y)=(g(b)-g(a))⋅x-(f(b)-f(a))⋅y-[g(b)⋅f(a)-g(a)⋅f(b)]
$$
In the point $(f(t^*),g(t^*)$ where the distance of curve and line is maximal, the scalar, differentiable function
$$
d(f(t),g(t))=(g(b)-g(a))⋅f(t)-(f(b)-f(a))⋅g(t)-[g(b)⋅f(a)-g(a)⋅f(b)]
$$
is extremal, and thus has derivative zero,
$$
0=(g(b)-g(a))⋅f'(t^*)-(f(b)-f(a))⋅g'(t^*).
$$
From there the result follows.