Each level of the recursion merges at most n elements, and there are about log n levels.
Merge sort is divide & conquer: split the range in half, trust both calls to hand their half back sorted, then merge two sorted lists, which is LC 21 again. Each row below is one depth of the recursion; each box is one call to mergeSort over its range.
Press Next to start.
Splitting costs nothing: it's one line computing mid. All the work is in merge, which touches every element of its two halves once. So add up the merging on one row: the boxes on a row never overlap, so together they merge at most n elements. Step to the end and read the counters beside the rows. With 8 numbers every merging row reports exactly 8; with 6 or 7 the deepest merging row reports a little less, because some of its boxes are single elements that don't merge at all.
Each level halves the boxes, so after about log₂ n levels they're single elements and the splitting stops. At most n work on each of about log n levels is O(n log n), the cost the recurrence T(n) = 2T(n/2) + n describes. Try the 8-element input: 3 levels of merging, 8 elements each, 24 in all.
Splitting is free; merging costs at most n per level; there are about log n levels.
On a tie, a[i] <= b[j] takes from the left half first, so equal values keep their original order. Pick [5, 1, 1, 2, 0, 0] and watch the two 0s and the two 1s.