Could you please explain the following two questions relating to differential of a variable.
In the method of integration by parts using substitution, we have $u = f(x)$, $v = g(x)$, $du = f'(x)dx$, and $dv = g'(x)dx$. Is it just a definition to assign those values to the differentials $du$ and $dv$ or is it based on some logics?
How could the highlighted differentials $dt$ $du$ in the below text be derived? I tried to use the method in (1) above but it didn't work out as I got $sin\theta cos\theta (1 - r^2) + r(cos^2\theta - sin^2\theta)$.

The point is that when you do substitution, you have $$ \int g(f(x))\,f'(x)\,dx=\int g(v)\,dv $$ by taking $v=f(x)$. Then the formula suggest that $f'(x)\,dx=dv$. The formula for integration by parts, that comes from the derivative of a product, is $$ \int f(x)\,g'(x)\,dx = f(x)g(x)-\int g(x)\,f'(x)\,dx. $$ With the above convention, and taking $u=g(x)$, you get $$ \int u\,dv=uv-\int v\,du. $$
The second case has nothing to do with the above. The situation is that now you have a double integral. When you do substitution in a double integral, taking $$ t=g(r,\theta),\ \ u=h(r,\theta), $$ the change of variable is given by $$ dt\,du=\begin{vmatrix} \frac{\partial g}{\partial r}&\frac{\partial g}{\partial \theta}\\ \frac{\partial h}{\partial r}&\frac{\partial h}{\partial \theta}\end{vmatrix}\,dr\,d\theta. $$ For the particular choice of polar coordinates in your example, the above determinant (called the Jacobian) is $r$.