In my engineering vibrations course, I am encountering derivatives that are partial as well as total. I am a little rusty and am having a really hard time grasping why the differentiation with respect to time is done differently in some scenarios.
Here is an example from my book:
I circled the two confusing terms in red and green. Why is the red term using chain rule while the green term simply takes a derivative with respect to x_dot?

It is $$d\dot{x}/dt=\ddot{x}$$ but $$d(\dot{x}^2)/dt=2\dot{x}\,d\dot{x}/dt=2\dot{x}\ddot{x}$$