I'm studying vector fields on manifolds and I have to prove that given $M$ a manifold, $U \subseteq M$ an open set, $\delta \in \mathbb{R}, \delta >0$, $h:(-\delta,\delta) \times U \rightarrow \mathbb{R} $ $C^{\infty}$map such that $h(0,q)=0 \forall q \in U$, there exists $g:(-\delta,\delta) \times U \rightarrow \mathbb{R} $ $C^{\infty}$map such that $g(0,q)=\frac{\partial h}{\partial t}(0,q)$ and $h(t,q)=tg(t,q)$.
The proof says that it is sufficient to take $$g(t,q)=\int_0^1 \frac{\partial h}{\partial t}(ts,q) ds$$ because $$tg(t,q)=\int_0^1 \frac{\partial h}{\partial t}(ts,q) d(ts)=h(t,q)-h(0,q)$$
but I don't understand why are both the equations true nor I am able to effectively compute these integrals. Can anyone provide me the intermediate steps that are necessary to understand it? Thanks in advance.
Let's maybe write $\partial_1 h$ rather than $\frac{\partial h }{\partial t}$ to note partial differentiation with respect to the first argument, I personally find this a less ambiguous notation in expressions like $\frac{\partial h }{\partial t}(ts,q)$, where the $t$ shows up in the arguments again. Maybe that's a source of your confusion.
Then, $g$ is just defined as
$$g(t,q) = \int_0^1 (\partial_1 h) (ts, q) \, ds. $$
That this fulfils the first equation is not too hard:
$$g(0,q) = \int_0^1 (\partial_1 h) (0, q) \, ds = (\partial_1 h) (0, q) \cdot \int_0^1 1 \cdot ds = (\partial_1 h) (0, q) .$$
The second equation is then simply a substitution: Let $u := t \cdot s,$ then "$du = t \cdot ds$" ( consider $t$ as a constant)1:
$$ t g(t,q) = \int_0^1 (\partial_1 h) (ts, q) \, t \cdot ds = \int_0^t (\partial_1 h) (u, q) \, du = h (t, q) - h (0, q), $$ where the last equation is just the fundamental theorem of calculus. Then you use your assumption $h(0,q) = 0$ and you're done!
1: Note that this substituion is only valid for $t \neq 0$, so if you want to be super clean, you should make two different cases for $t \neq 0$ and $t = 0$. But $t = 0$ is not too difficult.