Answer
$\frac{|q_{1}|}{|q_{2}|}=\frac{1}{3}$
Work Step by Step
Let, $\vec B$ be the magnetic field acting on both the particles and this field makes an angle $\theta$ with respect to their motions. $q_{1}$ and $q_{2}$ are the charge of particle 1 and particle 2 respectively. Particle 1 travels three times faster than particle 2, $v_{1}=3v_{2}$.
Each particle experiences a magnetic force of the same magnitude.
Therefore,
$|\vec F_{1}|=|\vec F_{2}|$
or, $|q_{1}|v_{1}B\sin \theta=|q_{2}|v_{2}B\sin \theta$
or,$\frac{|q_{1}|}{|q_{2}|}=\frac{v_{2}}{v_{1}}$
or,$\frac{|q_{1}|}{|q_{2}|}=\frac{v_{2}}{3v_{2}}$
or,$\frac{|q_{1}|}{|q_{2}|}=\frac{1}{3}$
Thus, the ratio of the magnitudes of the charge is $\frac{|q_{1}|}{|q_{2}|}=\frac{1}{3}$