Question: While deriving Lagrange equation of motion we may see two equations.

**The first one is** $\frac{\partial \mathbf{r}\_i}{\partial q\_j} = \frac{\partial \mathbf{\dot r}\_i}{\partial \dot q\_j}.$ How is this true?

AFAK $\mathbf{r}\_i = \mathbf{r}\_i(q\_1, q\_2, \cdots, q\_m),$ where in turn every $q$ is some function of $t.$ So first i need to know what is $\mathbf{\dot r}\_i.$ Is it $$\sum\_{j=1}^m \frac{d \mathbf{r}\_i}{d q\_j}\frac{dq\_j}{dt}?$$

If true, then we can write 
$$\frac{\partial \mathbf{\dot r}\_i}{\partial \dot q\_j} = \frac{\partial \bigg(\sum\_{k=1}^m \frac{d \mathbf{r}\_i}{d q\_k}\frac{dq\_k}{dt}\bigg)}{\partial \dot q\_j} = \frac{\partial \bigg(\frac{d \mathbf{r}\_i}{d q\_j} \dot q\_j\bigg)}{\partial \dot q\_j} = \frac{d \mathbf{r}\_i}{d q\_j} = \frac{\partial \mathbf{r}\_i}{\partial q\_j}.$$

**The second one is** $$\frac{d}{dt}\bigg(\frac{\partial \mathbf r\_i}{\partial q\_j}\bigg) = \frac{\partial \mathbf{\dot r}\_i}{\partial q\_j}$$
In this case i don't even know how to start.

Answer: 
Try to understand what it means.

The absolute value $| m - n |$ is $m - n$ when $n \le m$ and $n - m$ when $n \ge m$
**Hint.** Recall that
$$
|u| =
\begin{cases}
-u, & \text{if $u \leq 0$} \\
u, & \text{if $u \geq 0$}
\end{cases}
$$ thus
$$
|m-n| =
\begin{cases}
n-m, & \text{if $m \leq n$} \\
m-n, & \text{if $m \geq n$.}
\end{cases}
$$