In the expression , the multiplicative factor A represents what is called the "amplitude of the wave-shaped function that you obtain as the graph. Such amplitude is understood as half of the crest-to-through distance of the wavy curve.
From the drawing, the crest is at y=2 and the through at y=-2 (a distance of 4 units) therefore the value of A should be half of that distance: 4/2 = 2