Usually the mean value theorems (including the general one) is extended from the rolle theorem by introducing a function.
Does this function has anything to do with geometric transformation?
Can geometric transformation or change of variable be used to (find the function) to derive the mean value theorem?
What is the intuition behind considering such functions applying rolle theorem on which yields the mean value theorem or the general mean value theorem?
Yes. The Rolle’s Theorem states that if there is $a$ and $b$such that $f(a)=f(b)$, then the graph of $f$ has an horizontal slope. Just rotate that slope to have the Mean value theorem