Equation of a body starting from mean position and undergoing SHM can be considered as
x=Asinωt,where ω=2π4=π2 rad/s
Particle reaches x=3 m at time t1
3=5sinωt1,⇒t1=1ωsin−1(35)=2×37180 s
Particle reaches x=4 m at time t2
4=5sinωt2,⇒t2=1ωsin−1(45)=2×53180
Hence time interval (t2−t1)=190(53−37)=845 s