In this video by Flammable Maths, the solution to a similar problem is given.
The only difference is that we just need to include the electrostatic force, besides that the process is exactly the same.
Let's say we have two objects $1$ and $2$ with mass $m_1,m_2$ and charge $q_1,q_2$ respectivey separated by distance $R$ then-
$$\textstyle\displaystyle{F=F_C+F_G=\frac{Gm_1m_2+kq_1q_2}{R^2}}$$
Where $G$ is the Newtonian constant of gravitation and $$\textstyle\displaystyle{k=\frac{1}{4\pi\epsilon_0}}$$
By newton's third law we have $F_{12}=-F_{21}$ so
$$\textstyle\displaystyle{F_{12}=\frac{Gm_1m_2+kq_1q_2}{(r_2-r_1)^2}=m_1\frac{d^2r_1}{dt^2}}$$
$$\textstyle\displaystyle{F_{21}=-\frac{Gm_1m_2+kq_1q_2}{(r_2-r_1)^2}=m_2\frac{d^2r_2}{dt^2}}$$
Where $R=r_2-r_1$
$$\therefore\textstyle\displaystyle{\frac{d^2r_2}{dt^2}-\frac{d^2r_1}{dt^2}}$$
$$\textstyle\displaystyle{=-\frac{Gm_1m_2+kq_1q_2}{(r_2-r_1)^2}\bigg(\frac{1}{m_1}+\frac{1}{m_2}\bigg)}$$
$$\implies\textstyle\displaystyle{\frac{d^2R}{dt^2}=-\frac{\kappa}{R^2}}$$
Now we just need to solve this differential equation-
$$\textstyle\displaystyle{\frac{dv}{dt}=-\frac{\kappa}{R^2}=\frac{dv}{dR}\frac{dR}{dt}}$$
$$\implies\textstyle\displaystyle{-\frac{\kappa}{R^2}=v\frac{dv}{dR}}$$
$$\implies\textstyle\displaystyle{-\kappa\int\frac{1}{R^2}dR=\int vdv}$$
At $t=0$, $R(0)=R_i$ [The initial radius]
$v(0)=0$ [velocity at the beginning]
$$\therefore\textstyle\displaystyle{\int_{0}^{v(t)}vdv=-\kappa\int_{R_i}^{R(t)}R^{-2}dR}$$
$$\implies\textstyle\displaystyle{\frac{v^2}{2}=\kappa\bigg(\frac{1}{R}-\frac{1}{R_i}\bigg)}$$
$$\implies\textstyle\displaystyle{v=\frac{dR}{dt}=\pm\sqrt{2\kappa\bigg(\frac{R_i-R}{R_iR}\bigg)}}$$
$$\implies\textstyle\displaystyle{\int_{0}^{T_c}dt=\pm\int_{R_i}^{0}\frac{1}{\sqrt{2\kappa\bigg(\frac{R_i-R}{R_iR}\bigg)}}dR}$$
$$\implies\textstyle\displaystyle{T_c=\pm\sqrt{\frac{R_i}{2\kappa}}\int_{R_i}^{0}\sqrt{\frac{R}{R_i-R}}dR}$$
Solving the integral is simple, if you would like to see the steps then see here. Noting that time can't be negative, we have-
$$\textstyle\displaystyle{T_c=\frac{\pi}{2}\sqrt{\frac{R^3}{2\kappa}}}$$
Now simply substituting the value for $\kappa$ and $k$ gives us less cleaner formula-
$$\textstyle\displaystyle{T_c=\sqrt{\frac{\pi^3\epsilon_0m_1m_2R^3}{2(m_1+m_2)(4\pi\epsilon_0Gm_1m_2+q_1q_2)}}}$$