Step-by-step explanation:
The magnetic force acting on a charged particle is :
![F=q(v* B)](https://img.qammunity.org/2021/formulas/physics/college/l037m5jda4qlmn6b6b7itkuwapz4sy21qg.png)
Here q = +q (for proton)
v is in +x direction
B is in +y direction.
So,
![F=q(vi* Bj)\\\\F=qvB\hat{k}](https://img.qammunity.org/2021/formulas/physics/high-school/3ai2d8qc0ktc2x8imn83jej0t6eedb2ucq.png)
It is clear that the magnetic force is acting +z direction. So, to balance the magnetic force with an electric force so that the proton will continue along a straight line, the electric force must act in -z direction.