Solution (source code)

= Solution

Put $+q$ at $x=0$ and $+4q$ at $x=l$, and write $k_e=1/(4\pi\epsilon_0)$. The <electric fields> of the two positive <point charges> can cancel only between them. For $Q\ne0$, zero <Lorentz force> on $Q$ therefore requires
$$
\frac{q}{x^2}=\frac{4q}{(l-x)^2},\qquad l-x=2x,\qquad x=\frac l3.
$$
The force of $+4q$ on $+q$ points left, so $Q$ must be negative to pull $+q$ right. Equating these forces gives
$$
\frac{k_eq|Q|}{(l/3)^2}=\frac{4k_eq^2}{l^2},\qquad\boxed{Q=-\frac{4q}{9},\quad x_Q=\frac l3.}
$$
For $+4q$, the attraction to $Q$ at separation $2l/3$ has magnitude $k_e(4q)(4q/9)/(2l/3)^2=4k_eq^2/l^2$, exactly balancing its repulsion from $+q$. Thus all three forces vanish, not only the force on the inserted charge.