Why $F = m\frac{dv}{dt} = m\frac{dv}{dx}\frac{dx}{dt}$
I think differentials don't behave like fractions so why is that the previous equation holds, seems like is related to the definition of force where P is momentum using the chain rule:
$$P = mv$$ $$\frac{dP}{dx} = m \frac{dv}{dx}\frac{dx}{dt} $$
I would like to see a detailed explanation in the chain rule step
As noticed in the comments this is simply the chain rule applied at $x(t)$ and $v(x(t))$ that is
$$F = m\frac{dv(x(t))}{dt} = m\frac{dv(x(t))}{dx(t)}\frac{dx(t)}{dt}$$
Starting from the momentum equation, with $m$ constant, we have
$$p=mv \implies F=\frac{dp}{dt}=\frac{dp}{dx}\frac{dx}{dt}=m\frac{dv}{dx}\frac{dx}{dt}$$