Motion of particle in magnetic field problem