assume we own a regular chess board (8 by 8), now we will randomly write in the slots of the board numbers from 1 to 64 (every number we will write exactly one time), show that the probability that {there are two adjacent squares (which share a rib - not diagonally) that the subtraction between the numbers is those squares is at least 5} = the probability of that equal 1 (or 100%).
means that need to show that there are at least one adjacent pair (row or column , not diagonally), so the subtraction of the numbers equal at least 5.
I can do even better: There must be at least one place where the difference is at least $6$.
For contradiction, let's say we have distributed the numbers so that adjacent squares have a difference of at most $5$, and to help in visualising, take a piece that can move like a king, but not diagonally (a so-called wazir). Then the rules can be restated as "There is no place on the board where the wazir can move between two squares whose numbers differ by more than $5$."
That means that numbers that numbers with a big difference must be placed on squares that are many wazir moves apart. The biggest limitation on any pair of numbers is $13$ moves, which corresponds to starting in one corner and ending up one move away from the opposite corner (the biggest separation you can get between two squares is $14$ moves).
Look at all pairs of numbers that must be separated by at least $13$ wazir moves. Those are $$ 1-64\\ 2-64\\ 3-64\\ 1-63\\ 2-63\\ 1-62 $$ That means that on the three squares in one corner we must have $1, 2, 3$, and on the three squares in the opposite corner we must have $62, 63, 64$. Clearly, $1$ and $64$ must go in the actual corner squares, since each of them must be separated by $13$ moves to all the three numbers on the opposite side. However, we cannot place the rest of them in any satisfactory manner (no matter what, $2$ and $63$ will be separated by $12$ moves, for instance).
Thus we see that it is impossible to distribute the numbers in a satisfactory manner deliberately, which means that if you distribute them randomly, you can't possibly manage to do it either, so the probability of it happening is $0$.