In the problem, the required time is double the time taken by the particle to move from the extreme position to the point P.

The displacement x is given as

x = A*cos(ωt)

The velocity v is given by

V = ωΑ*sin(ωt)

V/x = ω*tan(ωt)

ωt = arctan(V/ωx)

t = 1/ω*arctan(V/ωx)

T' = 2t = 2/ω*arctan(V/ωx)

Put ω = 2π/T and find T'