So, I have to prove directly (e.g. by substitution) that if a path satisfies the Euler-Lagrange equations for the Lagrangian $L$ it does so for $$L'=L+\frac{df(q,t)}{dt}.$$ Let me tell you what I have done:
$$\frac{d}{dt}\frac{\partial L'}{\partial \dot{q_i}}-\frac{\partial L'}{\partial q_i}=(\frac{d}{dt}\frac{\partial L}{\partial \dot{q_i}}-\frac{\partial L}{\partial q_i})+(\frac{d}{dt}\frac{\partial}{\partial \dot{q_i}}\frac{df}{dt}-\frac{\partial}{\partial q_i}\frac{df}{dt})$$
I would like to somehow prove that the second parenthesis is $0$ to this end I have used the following:
$$\frac{\partial}{\partial \dot{q_i}}=\sum\frac{\partial q_j}{\partial \dot{q_i}}\frac{\partial}{\partial q_j} \Rightarrow \frac{d}{dt}\frac{\partial}{\partial \dot{q_i}}=\sum \frac{d}{dt}\frac{\partial q_j}{\partial \dot{q_i}}\frac{\partial}{\partial q_j}=\sum \frac{\partial \dot{q_j}}{\partial \dot{q_i}}\frac{\partial}{\partial q_j}.$$
Now the proof is complete IF $$\frac{\partial \dot{q_j}}{\partial \dot{q_i}}=δ_{ij} .$$ I know this is true for $q_i,q_j$ but is it also true for their derivates?