take the example of simple vibration:
A..........B*..........C
here,* is the body and ............ indicates its path.
initially it is at the mid point of the dots.
Assume that initially the body is at the mid point of the path shown.
then, amplitude= BC
given that total distance covered in one complete vibration is 20 cm
path: B to C, then C to B then, B to A and finally A to B
so, BC+CB+BA+AB = 20,
as all of them are equal, so amplitude comes 5 cm