The displacement does not depend on the path of the object. An object can move from position A to position B following different paths. But its displacement will be from A towards B. The minimum distance between A and B, that is, in this case, the linear distance AB is the magnitude of displacements. So, distance and displacement are not always equal.
Your blog is really cool. This helps me understand physics more. Thank you!