$$\lim\limits_{n \to \infty}\frac{\sin(\frac{b}{n})+\sin(\frac{2b}{n})+...+\sin(\frac{nb}{n})}{n}$$
It is clear that sum in sigma notation is $$\sum_{i=1}^n \frac{\sin(\frac{bi}{n})}{n} $$ while general formula is $$\sum_{i=1}^n f(c_i)\Delta{x} $$
In this problem $\Delta{x} = \frac{1}{n}$, so $b-a=1$
How do I get to know that $b = 1$ and $a=0$ to evaluate definite integral and why $f(x) = \sin(bx)$ rather than $\sin(\frac{bx}{n})$?
You get $a=0$, by checking the minimum value that $\frac{r}{n}$ takes, this happens when $r=0$, and of course $n$ approaches $\infty$, you get b by checking the maximum value that $\frac{r}{n}$ takes, as $r=n$ for the last term that value is $1$.
For your second question:
we assume $x$ as a variable = $\frac{r}{n}$ to perform the integration, such that when $r$ takes discrete values $(r=0,1,2 \cdots )$, $\frac{r}{n}$ i.e $x$ takes every value ranging from $0$ to $1$, hope this clears it!