Can you please explain this to me?

The amplitude is determined as the distance from the midline of the cosine function.
From the graph provided, the depth is shown as 3 units (between 5 units and 2 units) which puts the midline at 3.5 units. The amplitude therefore is 1.5