Particle is executing SHM is represented by
x(t)=Asin(ωt+ϕ)
Therefore, we have
v(t)=Aωcos(ωt+ϕ)
Now, since, the position and velocity of the particle at t=0 s are 2 cm and 2ω cm s−1 respectively
⇒ 2=Asinϕ ...(1)
and, 2ω=Aωcosϕ ...(2)
Again, from (1) and (2) we have
tanϕ=1
⇒ ϕ=45∘
Putting this value in eq (1) we get
2=A(1√2)
⇒ A=2√2
Hence, the value of x=2.