What is the meaning of the expression $\frac{d^2x}{ds^2}=\frac{dx}{ds}\frac{d}{dx} \left(\frac{dx}{ds} \right)$ I'm reading a book where there is the following excerpt:



Question 1: What is the meaning of the expression $\frac{d^2x}{ds^2}=\frac{dx}{ds}\frac{d}{dx} \left(\frac{dx}{ds} \right)$ and $\frac{d^2y}{ds^2}=\frac{dx}{ds}\frac{d}{dx} \left(\frac{dy}{dx}\frac{dx}{ds} \right)$? I understand that it may have something to do with the chain rule, but what is odd to me is that I am used to seeing the chain rule as something like $\frac{dx}{dy}=\frac{dx}{ds}\frac{ds}{dy}$, Ie: In a way that if we multiply numerators and denominators and cancel similar factors, we get $\frac{dx}{dy}$. What troubles me in the expressions I asked about is that it seems he is "factoring" $d$ out of the $d^2x$ and I remember reading somewhere that the $dx$ is a symbol for "a single thing", not the product of $d$ and $x$ but then how is he factoring the $d$ out of the $d^2x$?! I had no idea this was allowed.
Question 2: This looks to me something like "non-modern calculus" which I guess Is not taught anymore today (at least I never say this kind of stuff happening I calculus books). What should I read in order to obtain fluency in such manipulations?
 A: It's the chain rule with the usual implicit understanding required to make sense of everything. If you want, you can let $u=\frac{dx}{ds}$ to clarify things. This is supposed to be a function of $s$ but if the mapping is nice an invertible with a differentiable inverse you can also consider it as a function of $x$. So, by definition of the second derivative and the chain rule,
\begin{align}
\frac{d^2x}{ds^2}&:=\frac{d}{ds}\left(\frac{dx}{ds}\right)\\
&=\left[\frac{d}{dx}\left(\frac{dx}{ds}\right)\right]\cdot \frac{dx}{ds}\tag{chain rule}\\
&=\frac{dx}{ds}\cdot\frac{d}{dx}\left(\frac{dx}{ds}\right),
\end{align}
where the last line uses commutativity of multiplication.
So, long story short, whenever you see $\frac{d}{ds}$, you replace it with $\frac{dx}{ds}\frac{d}{dx}$. There is no factoring of $d$ going on. It's chain rule and the definition/notation for second derivatives.
In more function-like notation, what is going on is we're first given a bijection $f:I\to J$, where $I,J\subset\Bbb{R}$ are open intervals say, and such that $f$ and $f^{-1}$ are differentiable. We shall agree by convention to denote a point in $I$ by $s$ and a point in $J$ by $x$; so we think of $f$ as mapping the $s$ space to the $x$ space. WHat the computation above is doing is:
\begin{align}
f''&:=(f')'\\
&=((f'\circ f^{-1})\circ f)'\tag{obviously}\\
&=[(f'\circ f^{-1})'\circ f]\,\cdot f'\tag{chain rule}\\
&=f'\cdot (f'\circ f^{-1})'\circ f,
\end{align}
where the last equality is just commutativity of multiplication. The composition with $f^{-1}$ is what allows us to regard $f'\equiv\frac{dx}{ds}$ "as a function of $x$" so that we can use the chain rule in the form $\frac{d}{ds}=\frac{dx}{ds}\frac{d}{dx}$.
The calculation for $y$ is the same story, with an extra composition involved (say $g:J\to K$, where $K$ is another open interval).
A: The expression $\frac{d^2 x}{ds^2}$ represents the second derivative of $x$ with respect to $s$. Combining that definition with chain rule,
$$
\frac{d^2 x}{ds^2}=\frac{d}{ds}\left(\frac{dx}{ds}\right)=\frac{d}{dx}\left(\frac{dx}{ds}\right)\frac{dx}{ds}.
$$
Likewise,
$$
\frac{d^2 y}{ds^2}
=\frac{d}{ds}\left(\frac{dy}{ds}\right)
=\frac{d}{dx}\left(\frac{dy}{dx}\frac{dx}{ds}\right)\frac{dx}{ds}.
$$
This computation seems modern as far as I can tell. Computations in calculus tend to involve abuses of notation that fail to make a distinction between variables and functions, but they can generally be made completely rigorous.
By the way, $dx$ is meaningless on its own (if we ignore infinitesimal calculus and differential forms). It only makes sense in the context of a derivative like $\frac{d}{dx}f$ or an integral like $\int f \ dx$.
