The first situation: their homes are on both sides of the library. So the distance between the two is:
(50+54)×8
= 104×8
=832 meters
The second situation: their home is on the same side of the library, and the small business owner is closer to the library. So the distance between the two is:
(54-50)×8
=4×8
=32 meters