Your method is correct, but you can do it without dividing by K and then multiplying by K :
\(F\,=\,K\cdot\frac{Q_1Q_2}{r^2} \\~\\ F\,=\,\frac{K(Q_1Q_2)}{r^2}\)
Multiply both sides of the equation by r2
\(Fr^2\,=\,K(Q_1Q_2)\)
Divide both sides of the equation by F .
\(r^2\,=\,\frac{K(Q_1Q_2)}{F} \)
If we need to include both solutions for r , then we need to take the positive and negative square root of both sides.
\(r\,=\,\pm\sqrt{\frac{K(Q_1Q_2)}{F}}\)
.