Figure (12-Q1) represents two simple harmonic motions,
The parameter which has different values in the two motions is
As in A figure the particle is moving in right direction and in B it is moving in the left direction.
From this we conclude that phase is different for both of the particles executing simple harmonic motion .that is why they are moving in different direction.
And the amplitude, frequency and velocity does not govern the particle direction.