Charges and masses problem

Question

Hints

Answer