Most likely this is a really easy question, but I forgot how to do it. It is also related to physics, but a mathematical question.
In physics the distance $x$ an object travels in some time $t$ given a gravitational field $g$ is
$$x=\frac{1}{2}g\,t^2$$
with $g$ depending on the current distance to a mass $M$
$$g(x) = \frac{GM}{x^2}$$
As the object moves a distance $\Delta x$ in some time $\Delta t$ I get:
$$\Delta x=\frac{1}{2}g\,\Delta t^2$$
and so
$$dx=\frac{1}{2}g\,(dt)^2$$
and finally
$$dx=\frac{1}{2}\frac{GM}{x^2}\,(dt)^2$$
Multiplying by $x^2$ I get
$$dx\,x^2=\frac{1}{2} G\,M\,(dt)^2$$
Easy to integrate the LHS, but how to integrate the RHS (with the differential squared)? Substitute it somehow? How to proceed?
Puttign aside the physics, what you are doing is mathematically not correct. Indeed, we have that
$$\dfrac{x(t+h)-x(t)}{h} = \dfrac{GM}{2hx(t+h)^2}(t+h)^2-\dfrac{GM}{2hx(t)^2}t^2.$$
Equivalently,
$$\dfrac{x(t+h)-x(t)}{h} = \dfrac{GM}{2hx(t+h)^2}(t^2+2th+h^2)-\dfrac{GM}{2hx(t)^2}t^2.$$
Then, letting $h\to0$ yields $x(t+h)\to x(t)$ and
$$x'(t) = \dfrac{GM}{2x(t)^2}2t=\dfrac{GM}{x(t)^2}t.$$
Or, in other words,
$$dx=\dfrac{GM}{x^2}tdt.$$