Let us draw the figure according to question, ltBrgt
A gentle push on q along the axis of the ring vives rise to the situation shown in the figure below.
Taking line elements of cahrge at A and B, having unit length, then charge on each elements.
`dF=2(-(Q)/(2piR))qxx(1)/(4piepsi_(0))(1)/(r^(2))costheta`
Total force on the charge q, due to entire rig
`F=-(Qq)/(piR)(piR)*(1)/(4piepsi_(0))(1)/(r^(2))*(2)/(r)`
`F=-(Qqz)/(4piepsi_(0)(Z^(2)+R^(2))^(3/2))`
Here zltltR, `F=-(Qqz)/(4piepsi_(0)R^(3))=-Kz`
where `(Qq)/(4piepsi_(0)R^(3))=`constant
`impliesF prop-Z`
Clearly force on q is prroportional to negative of its displacement. therefore, motion of q is simple harmonic.
`omega=sqrt((K)/(m)) and T=(2pi)/(omega)=2pisqrt((m)/(K))`
`T=2pisqrt((m" "4piepsi_(0)R^(3))/(Qq))`
`impliesT=2pisqrt((4piepsi_(0)m" "R^(3))/(Qq))`