Solution seems vague

Let us suppose that the answer is maximum for Max(a[i]+i] - Min(a[i]+i]. How can we conclude that the initial equation will get simplified to this for the obtained i and j value?
i.e. if Max(a[i]+i) for i=a & Min(a[i]+i) for i=b
However for i=a and j=b the initial equation gets simplified to (A[i]-i) - (A[j]-j)?

Click here to start solving coding interview questions