If $\lim_{n\to\infty} n\left(b-\sum_{r=1}^n\frac{1}{n+r}\right)=a,$ find $a$ and $b.$
My progress:
As $\lim_{n\to\infty}\sum_{r=1}^n\frac{1}{n+r}=\ln 2\implies b=\ln 2$
Now what to do for $a$
If $\lim_{n\to\infty} n\left(b-\sum_{r=1}^n\frac{1}{n+r}\right)=a,$ find $a$ and $b.$
My progress:
As $\lim_{n\to\infty}\sum_{r=1}^n\frac{1}{n+r}=\ln 2\implies b=\ln 2$
Now what to do for $a$
Getting the value of $a$ is tricky / non-obvious. Use the following lemma
Lemma: If $f\in C^{1}[0,1] $ then $$\lim_{n\to\infty} \sum_{k=1}^{n}f\left(\frac{k}{n}\right)-n\int_{0}^{1}f(x)\,dx=\frac{f(1)-f(0)}{2}$$ (proof available here)
In the above lemma it is sufficient to assume the Riemann integrability of $f'$.
For your question $f(x) = 1/(1+x)$ and the limit $a$ is $$\lim_{n\to\infty} n\int_{0}^{1}f(x)\,dx-\sum_{k=1}^{n}f\left(\frac{k} {n} \right)$$ which by above lemma equals $(f(0)-f(1))/2=1/4$.
Recall that by the rate of convergence of the Harmonic series
$$\sum_{r=1}^n\frac{1}{n+r}=\sum_{r=1}^{2n}\frac{1}{r}-\sum_{r=1}^n\frac{1}{r}= \ln 2n+\gamma+\frac1{4n}-\ln n-\gamma-\frac1{2n}+o\left(\frac1n\right)=$$$$=\ln 2-\frac1{4n}+o\left(\frac1n\right)$$
then we have
$$\lim_{n\to\infty} n\left(b-\sum_{r=1}^n\frac{1}{n+r}\right)=\lim_{n\to\infty} n\left(b-\ln 2+\frac1{4n}+o\left(\frac1n\right)\right)=a$$
therefore $b=\ln 2$ and $a =\frac14$.