Answer
a) Out of the page.
b) Upward.
Work Step by Step
$$\color{blue}{\bf [a]}$$
Recalling that
$$\vec F=q\vec v\times \vec B $$
So according to the right-hand rule for a positive charge, the magnetic field $\vec B$ must be out of the page.
$$\color{blue}{\bf [b]}$$
According to the right-hand rule for a negative charge, which is opposite the direction determined by the right-hand rule for a positive charge, the magnetic field $\vec B$ must be upward.