A_m = A_1 + d*(m-1) = n,
A_n = A_1 + d*(n-1) = m,
A_n - A_m = (A_1 + d*(n-1) ) - ( A_1 + d*(m-1) ) = m - n,
A_1 + d*(n-1) - A_1 - d*(m-1) = m-n,
d*(n-1 - m +1) = m-n,
d*(n-m) = m-n,
т.к. n ≠m, то n-m≠0, и
d = (m-n)/(n-m) = -(n-m)/(n-m) = -1.
d = -1.
A_m = A_1 + (-1)*(m-1) = n,
A1 = n+m-1.
A_k = A_1 + d*(k-1) = (n+m-1) + (-1)*(k-1) = n+m - 1 - k + 1 = n+m-k.
Ответ. A_k = n+m - k.