control systems - how to obtain the transfer function from this block diagram?
The procedure you are following is correct. But there is a mistake in the derivation. Your 3rd step is wrong. It has to be:

$$V(s)=R\left(-x_2\frac{R}{Ls}+\frac{x_{21}}{s}\right)$$

So if you proceed with that you will end up with something like 
$$V(s)=R\left(-x_2\frac{R}{Ls}+\left(\frac{U(s)}{Cs}-\frac{x_2}{Cs}\right)\frac{1}{Ls}\right)\tag1$$

What we want is \$\frac{V(s)}{U(s)}\$ but we have \$V(s)\$ in terms of \$U(s)\$ and \$x_2\$. So we have to represent \$x_2\$ either in terms of \$U(s)\$ or \$V(s)\$. Here, it is easy to represent \$x_2\$ in terms of \$V(s)\$
$$x_2=\frac{V(s)}{R}$$

I guess you can do the remaining. Substitute for \$x_2\$ in equation \$(1)\$, take all the \$V(s)\$ terms to one side and then find \$V(s)/U(s)\$. You will end up in the required expression.