I explain all this below because I want to exactly see the problem in my flow and would need an explanation depending on this example that I'm bringing. Please don't try to bring $p$ as generalized variable, let's stick with $ds/dt$.
We have $s(t) = t^2$ function which is distance-time graph.
- t=1, s = 1
- t=2, s = 4
- t=3, s=9
Let's do Legendre transformation. We know that legendre is $y$ interception of each of tangent line of our curve. So we're looking for the equation of $b$ from $kx +b$.
$b = \frac{ds}{dt}t - s(t)$
By getting rid of $t$ from the equation in order to fully transform to different variable other than t, we end up with: $\frac{1}{4}(\frac{ds}{dt})^2$. Now, if we plug in velocities, we will get the distance again - e.x when car had velocity = 4, distance he had travelled at that moment was 4. which is correct.
So here, distance was exactly $b$ as in $b(v)$ which gets us the distance.
Doing the same for $s = t^3$, I end up:
$$b = \sqrt{\frac{1}{3}\frac{ds}{dt}} \frac{ds}{dt} - \frac{1}{3}\frac{ds}{dt}\sqrt{\frac{1}{3}\frac{ds}{dt}}$$ (Specifically don't mention $p$ generalization as I want to understand this both physically and mathematically. Note now that at $t=2$, $s = 2^3=8$. By looking at $s' = 3t^2$, we see that at $t=2$, $v = 12$. Now, if we plug this for $\frac{ds}{dt}$ in the derived legrende , we get $b = 2*12 - 4*2 = 16$, but our distance was 8. So I don't get it, I plugged in velocity, it gave me 16.
I know that it would be more confusing if it always had matched the distance. I don't get what $16$ truly means for this case. Should It always be matching such as $s(t) = b(v)$ where pluggined in $v$ is velocity at time $t$ which we plug in $s(t)$ ?