# distance between 2 clusters

I have the formula and an example for calculating the distance between 2 clusters below,

I couldn't figure out why and how {2,4,8} can become 8 and {-5,0,5} can become -5. Can someone please enlighten me please?

$D$ is a linkage criteria, it is known as complete linkage. Goto Wikipedia:
The distance between the two clusters is the maximum between the two clusters. Obviously, $8$ and $-5$ are the furthest in your scenario. For instance, $D(8,0)$ = |8-0| = only 8.