We need to find the number of pairs $i,j$ such that $1\le i < j \le 90.$ and $j - i > 10$. My approach would be to count the total number of pairs which satisfy the first condition, i.e. $90\cdot91/2 - 90$. Then subtract the $10$ ineligible pairs from $i = 1$ to $i = 80$, and then subtract the pairs from $i = 81$ to $i= 89$, which gives $-80\cdot10-(9+8+7+..+1) = -845$
In total, this is 3160.
But there is a simpler approach. Namely the sum of integers from 1 to 79 which is $79\cdot40$? Why does this work?
Consider $j'=j-10.$ Then you looking for all pairs $i,j'$ with $1\le i < j' \le 80.$ This is like picking a 2-element subset out of the 79-element set $\{1,2,\dots,80\}.$ There are $\binom{80}{2} = 79\cdot 80 / 2 = 3160$ such subsets.