d[u] => shortest path from s to u

d[v] => shortest path from s to v

(1) d[u] $\leqslant$ d[v] + 1 ( if d[u] > d[v] + 1 than d[u] can’t be shortest path from s to u )

same way

(2) d[v] $\leqslant$ d[u] + 1 ( if d[v] > d[u] + 1 than d[v] can’t be shortest path form s to v)

use 1^{st} eneuqlity d[u] – d[v] $\leqslant$ 1

use 2^{nd} eneuqality d[u] – d[v] $\geqslant$ -1

so from above two enquality -1 $\leqslant$ d[u] – d[v] $\leqslant$ 1

So d[u] – d[v] = 2 is not possible