TDRIVER Editorial Explanation

In the editorial of TDRIVER ,It is written to transform (x,y) to ( (ax+by)/2) , (ax-by)/2) )

Can anybody explain what is logic behind this approach and How it give the required result ?

TDRIVER Problem Link

Please see the updated section in the editorial.

Please see my explanation of [usefulness of the transformation][1] and the [proof of the equality of Chebyshev distance before the transformation to the Manhattan distance after the transformation][2].

what is logic behind this piece of code present in setter solution?

long long result = 0;
long long sum_prev = 0;
for (int i = 1; i <= n; i++) {
sum_prev += x[i];
result += (long long)x[i] * i - sum_prev;