You seem to have confused the roles of a and b. The amplitude of is 3, while the amplitude of the graph is 2. The period of is , while the period of the function in the graph is .