If we substitute n+1 for n in n2-n+1 we get: (n2+2n+1)-(n+1)+1=n2+n+1, which is the denominator of the second term.
Let an=1/(n2-n+1), bn=1/(n2+n+1), then an+1=bn.
un=an-bn; un+1=an+1-bn+1=bn-bn+1; un+2=an+2-bn+1=bn+1-bn+2; etc.
un+un+1+un+2=an-bn+bn-bn+1+bn+1-bn+2=an-bn+2, because intermediate terms cancel out.
Note that S1=u1=a1-b1 and S2=u1+u2=a1-b1+b1-b2=a1-b2.
Also Sn=a1-b1+b1-b2+...-bn-1+bn-1-bn=a1-bn.
When n=m+1, um+1=am+1-bm+1=bm-bm+1; when n=2m, u2m=a2m-b2m=b2m-1-b2m.
The number of terms between the limits m+1 (inclusive) and 2m=2m-(m+1)+1=m, which defines the sum for Sm.
All that remains now is to calculate and simplify the difference between the first and last terms of the summed series.
First term is am+1=1/(m2+2m+1-m-1+1)=1/(m2+m+1); last term is b2m=1/(4m2+2m+1).
Therefore Sm=1/(m2+m+1)-1/(4m2+2m+1),
Sm=(4m2+2m+1-m2-m-1)/[(m2+m+1)(4m2+2m+1)],
Sm=(3m2+m))/[(m2+m+1)(4m2+2m+1)]=m(3m+1))/[(m2+m+1)(4m2+2m+1)].