The equation of motion is $$m\frac{d\mathbf{v}}{dt}=q(\mathbf{E}+\mathbf{v} \times \mathbf{B})$$ in which the bold letters represent vectors : $$\mathbf{E}=\mathbf{j}E, \mathbf{B}=\mathbf{j}B, \mathbf{v}=\mathbf{i}\dot x+\mathbf{j}\dot y+\mathbf{k}\dot z$$ $$\mathbf{v}\times \mathbf{B}=\mathbf{k}\dot x B-\mathbf{i}\dot zB$$

Therefore $$\ddot x=-\frac{qB}{m}\dot z, \ddot y=\frac{qE}{m}, \ddot z=\frac{qB}{m}\dot x$$ Taking the derivative again and substituting : $$\dddot x=-\frac{qB}{m}\ddot z= -\omega^2\dot x$$ $$\dddot z=\frac{qB}{m}\ddot x=-\omega^2\dot z$$ in which $\omega=\frac{qB}{m}$. The general solution is $$\dot x=C\cos\omega t+D\sin\omega t$$ $$y=\frac12 a t^2+G t+H$$ where $a=\frac{qE}{m}$. Initial conditions at $t=0$ are $x=y=z=0, \dot x=u, \dot y=-v, \dot z=0$.

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.