Notice that we have introduced the functions $f$ and $g$ rather than using the crude (and ambiguous) notation of $\tilde{q} = \tilde{q}(q, t)$, for example. We first establish the velocity relation \begin{equation} \label{vel} \tilde{v} = \dd{\tilde{q}}{t} = \pd{f}{t} + \pd{q}{t}\pd{f}{q} = \pd{f}{t} + v\pd{f}{q} \equiv g(t, q, v). \end{equation}

Next, we want to compute the two components of \begin{equation} \label{el} \dd{}{t} \left(\pd{L}{v}\right) - \pd{L}{q} \end{equation}

in terms of $\tilde{L}$. Start with the second term. We have \begin{align} \pd{L}{q} &= \pd{}{q}\tilde{L}(t, f(t, q), g(t, q, v) \\ &= \pd{f}{q} \pd{\tilde{L}}{f} + \pd{g}{q} \pd{\tilde{L}}{g}, \label{tmp1} \end{align}

where the terms \[ \pd{\tilde{L}}{f} = \pd{\tilde{L}}{\tilde{q}}, \qquad \pd{\tilde{L}}{g} = \pd{\tilde{L}}{\tilde{v}}, \]

indicate derivatives in second and third arguments. We can also verify from \eqref{vel} \[ \pd{g}{q} = \pd{}{q} \left[\pd{f}{t} + v\pd{f}{q}\right] = \pd{^2 f}{q\partial t} + v\pd{^2 f}{q^2}. \]

Combining with \eqref{tmp1} gives \[ \pd{L}{q} = \pd{f}{q} \pd{\tilde{L}}{\tilde{q}} + \pd{\tilde{L}}{\tilde{v}} \underbrace{\left[\pd{^2 f}{q\partial t} + v\pd{^2 f}{q^2}\right]}_{\de/\de{t}(\partial f/\partial q)}. \]

At this point, you may be comfortable with breaking notation and setting $f = \tilde{q}$ and $g = \tilde{v}$, so that the above can be written as \begin{equation} \label{comp1} \pd{L}{q} = \pd{\tilde{q}}{q} \pd{\tilde{L}}{\tilde{q}} + \pd{\tilde{L}}{\tilde{v}} \dd{}{t}\left(\pd{\tilde{q}}{\tilde{q}}\right). \end{equation}

This leaves us to compute the first term of \eqref{el}. We have \[ \pd{L}{v} = \pd{\tilde{L}}{v} = \pd{g}{v} \pd{\tilde{L}}{g} = \pd{f}{q} \pd{\tilde{L}}{g}, \]

where the last equality follows from taking the partial derivative of $g$ from \eqref{vel}. Thus we have \begin{equation} \label{comp2} \dd{}{t}\left(\pd{L}{v}\right) = \dd{}{t} \left(\pd{f}{q} \pd{\tilde{L}}{g}\right) = \pd{f}{q} \dd{}{t} \left(\pd{\tilde{L}}{g}\right) + \pd{\tilde{L}}{g} \dd{}{t} \left(\pd{f}{q}\right). \end{equation}

We now subtract \eqref{comp1} from \eqref{comp2} to obtain the result that \[ \pd{\tilde{q}}{q} \left[\dd{}{t} \left(\pd{\tilde{L}}{g}\right) - \pd{\tilde{L}}{\tilde{q}}\right] = 0. \]

The multivariable version can be done similarly, and the key is to use Einsteinian tensor summation notation and not to think too hard. First, we write \[ L(t, q_a, v_a) = \tilde{L}(t, \tilde{q}_a, \tilde{v}_a). \]

where the single indices should cycle through the complete set of coordinates. Then the analogy to the velocity relation \eqref{vel} is \[ \tilde{v}_b = \pd{\tilde{q}_b}{t} + v_a \pd{\tilde{q}_b}{q_a}. \]

The analogy to \eqref{comp1} gives \begin{equation} \label{comp3} \pd{L}{q_a} = \pd{\tilde{q}_b}{q_a} \pd{\tilde{L}}{\tilde{q}_b} + \pd{\tilde{v}_b}{q_a}\pd{\tilde{L}}{\tilde{v}_b} = \pd{\tilde{q}_b}{q_a} \pd{\tilde{L}}{\tilde{q}_b} + \pd{\tilde{L}}{\tilde{v}_b} \dd{}{t}\left(\pd{\tilde{q}_b}{\tilde{q}_a}\right). \end{equation}

The analogy to \eqref{comp2} gives \begin{equation} \dd{}{t}\left(\pd{L}{v}\right) = \dd{}{t} \left( \pd{\tilde{v}_b}{v_a} \pd{\tilde{L}}{\tilde{v}_b} \right) = \dd{}{t} \left( \pd{\tilde{q}_b}{q_a} \pd{\tilde{L}}{\tilde{v}_b} \right). \end{equation}

Expanding the time derivative and subtraction of \eqref{comp3} then gives the desired result.