Derivation of the second derivative of distance wrt time The formula for the second derivative of distance with respect to time is
$a = \dfrac{d}{dt}\left(\dfrac{ds}{dt}\right)$
$= \dfrac{d^2s}{dt^2}$   (just the $t$ is squared - it's not $dt$ all squared).
The question is why is $dt$ multiplied by $dt$ equal to $dt^2$ with just the $t$ squared. Why is not the $d$ also squared? As we can see $d . ds$ becomes $d^2 s$.
Apologies for this probably simple question, I am at the beginning of a very long road in maths.
 A: I would say that what looks like the denominator in $\dfrac{d^2s}{dt^2}$ represents $dt$ all squared.
Let's suppose you have the following data with constant acceleration and try to calculate it:
s   35  75  135  215  315   
t   10  12   14   16   18

Take the differences and you get 
ds    40   60   80  100
dt     2    2    2    2

suggesting velocities of $\dfrac{ds}{dt}=20,30,40,50$ measured at intervals $2$ seconds apart
Now take the difference of ds to give d^2 s, but square dt to give (dt)^2 
d^2 s   20   20   20  
(dt)^2   4    4    4 

suggesting that the acceleration is $\dfrac{20}{4} = 5$.  This is consistent with the original example data for $s$ and $t$, suggesting the $d^2s$ could be understood as the second difference in distance, i.e. $d(ds)$.  It also suggests that the $dt^2$ could be understood as the square of the first difference of time, i.e  $dt$ all squared.
In other cases the acceleration will change with time and you are interested in limits as the time intervals $dt$ tend to zero.  But while taking that limit you are in effect looking at $(dt)^2$ rather than $d(t^2)$ or $(dt)t$   
A: Although the notation of derivative $\dfrac{d}{dt}\left(\dfrac{ds}{dt}\right)$ looks like a fraction but it's not a fraction; that's why it doesn't implies $d$ is multiplied by $ds$ and $dt$ is multiplied by $dt$. 
$\dfrac{ds}{dt}$ means derivative of $s$ with respect to $t$ and similarly $\dfrac{d}{dt}\left(\dfrac{ds}{dt}\right)$ means derivative of $\dfrac{ds}{dt}$ with respect to $t$. 
So the notation for derivative of $\dfrac{ds}{dt}$ with respect to $t$ is $\dfrac{d}{dt}\left(\dfrac{ds}{dt}\right)$ which is also expressed by $\dfrac{d^2s}{dt^2}$.
For more details you can follow the answers of this question: Is $\frac{\textrm{d}y}{\textrm{d}x}$ not a ratio?
