Our first step in this physics problem should be to identify all of the forces that act on the objects. There are two forces here,electrical and gravitational. Since both objects have the same charge in magnitude(like charges), the electrical force should be repulsive and equal to F(el) = (k*q^2)/ r^2.
The gravitational force, on the other hand, is always attractive and equal to F(gr) = (G*m^2)/r^2. In orde the objects to be balanced, F(el) = F(gr). Therefore,
(kq^2)/ r^2 = (Gm^2)/r^2
m = (square roof of (k/G) ) * q kg.