Solution (source code)

= Solution

Define the requested <electric potential difference> as $\Delta V=V(b)-V(-a)$. Since $E_x=-dV/dx$,
$$
\begin{aligned}
\Delta V&=-\int_{-a}^{b}E_x(x)\,dx\\
&=\frac{C}{\epsilon_0a}\int_{-a}^{0}(x+a)\,dx+\frac{C}{\epsilon_0b}\int_0^b(b-x)\,dx,
\end{aligned}
$$
so
$$
\boxed{V(b)-V(-a)=\frac{C(a+b)}{2\epsilon_0}}.
$$
Geometrically, the integral is the area of two triangles under the signed <electric field> profile. For $C>0$, the right-hand plane is at higher <electric potential>. Choosing $V(-a)=0$, a continuous interior <electric potential> is $V=C(x+a)^2/(2\epsilon_0a)$ in the first slab and $V=Ca/(2\epsilon_0)+C(x-x^2/(2b))/\epsilon_0$ in the second. These expressions also verify the boundary values directly.