I know that the path will be helical and the particle will move initially in negative y direction then stop and then return. I don't think that the method to solve it is that the pitch should be an integer because I couldn't see any problem if pitch is not an integer.

I am sorry, I misunderstood your comment "The option is not there." I thought you meant that the correct answer is not option C. (Does your book say that the correct answer is C or A? The tick mark is half way between them.)

There must have been a problem with the software. It seems to be ok now.

Therefore $$\dot x=u\cos\omega t, x=\frac{u}{\omega}\sin\omega t$$ $$\ddot z=\omega\dot x=\omega u\cos\omega t, \dot z=u\sin\omega t, z=\frac{u}{\omega}(1-\cos\omega t)$$ $$y=\frac12 a t^2-vt=(\frac12 at-v)t$$ from which we can see that $$x^2+(z-\frac{u}{\omega})^2=(\frac{u}{\omega})^2$$ which is the equation of a circle.

So the particle circles around the axis $(x,z)=(0,\frac{u}{\omega})$ while accelerating in the +y direction.

Returning to the question we can see that the particle will return to the origin when $y=0$ which occurs when $$v=\frac12 at=\frac{qE}{2m}t$$ We must also have $x=z=0$ which requires that $\omega t=\pi n$ and $ \omega t=2\pi n$ respectively, where $n$ is an integer. The latter2 conditions are both satisfied when $\omega t=2\pi n$. Therefore $$v=\frac{qE}{2m}\frac{2\pi n}{\omega}=\frac{qE}{m}\pi n\frac{m}{qB}=\pi n \frac{E}{B}$$ The particle returns to the origin only once if $$n=\frac{vB}{\pi E}$$ is an integer, which is option (C).

Simpler Solution

The only force along the $y$ axis is $qE$ in the $+y$ direction. The acceleration in the $+y$ direction is $a=\frac{qE}{m}$. The particle is launched like a projectile with velocity $-v$ along the $y$ axis. The time it takes to return to the origin (with velocity $+v$) is $$T=\frac{v-(-v)}{a}=\frac{2mv}{qE}$$

In the $xz$ plane the only force is the magnetic force $quB$ which is always directed perpendicular to the velocity in this plane. The result is circular motion with cyclotron frequency $\omega=\frac{qB}{m}$. The time taken for the particle to return to the point in the $xz$ plane from which it was launched is $$t=\frac{2\pi}{\omega}=\frac{2\pi m }{qB}$$

The particle will return to the origin if it makes a whole number of orbits of the circle in the $xz$ plane in the same time that the projectile motion along the $y$ axis takes to return to the origin. The condition is that : $$T=nt$$ $$\frac{2mv}{qE}=n\frac{2\pi m}{qB}$$ $$n=\frac{vB}{\pi E}$$ which must be an integer.