Python 2, 3434 28 bytes
lambda n,k:(2*k-(k/n)*nk+k%n)*-~(k/nn+1)/2
###A different approach:Try it online!
I did not want to port my Ruby answer to Python (I knew somebody else would)Thanks Martin Ender, so I started looking for a general formula:
If we call w=k/n
then we can decompose the sum into the sum of integers from 1 to n: w*(w+1)/2
repeated n timesNeil and the rest (w+1)*(k-w*n)
Mr Xcoder for helping. Add the two terms and simplify: we have the formula!