You have an idea of how the solution might proceed, but what you are missing is the enumeration over all possible values of the central number.
Let's count the number of admissible triplets. Suppose we select three numbers that form an arithmetic progression from the set $\{1, 2, \ldots, 21\}$. Then, as you have observed, this triplet is expressible in the form $(a-d, a, a+d)$ for some integers $a, d$ such that $$1 \le a-d < a < a+d \le 21.$$ It should be clear that the smallest such $a$ is $2$ and the largest is $20$. For some general $a$ in this range, a bit of thought shows that there are $\min(21-a, a-1)$ choices for $d$: for example, if $a = 4$, we could choose $d \in \{1, 2, 3\}$. If $a = 15$, then you could choose $d \in \{1, 2, 3, 4, 5, 6\}$. So the number of triplets in AP is given by $$n = \sum_{a=2}^{20} \min(21-a, a-1).$$ Well, $21-a = a-1$ when $a = 11$, the midpoint of $\{1, 2, \ldots, 21\}$. So we split the sum at this value: $$n = \sum_{a=2}^{11} a-1 + \sum_{a=12}^{20} {21-a} = \frac{10(11)}{2} + \frac{9(10)}{2} = 100.$$
Finally, to get the probability, we simply divide by the number of possible triplets, which is $\binom{21}{3} = 1330$, hence the probability is $$\frac{10}{133}.$$
How would you generalize this to the case where you select from the set $\{1, 2, \ldots, m\}$?