The force between the spheres is proportional to the charge and inversely proportional to the square of the distance between them.
So you perform the measurements with the two spheres charged to some arbitrary level since it's very difficult to charge them to a fixed amount.
Then, bring an uncharged identical sphere into contact with one of the two spheres. This will cause the charge on the touched test sphere to be shared with the uncharged 3rd sphere. i.e. it's charge will halve.
If you now perform the distance measurements again, the test spheres will have moved closer together.
Now discharge the 3rd sphere, and contact it again with the test sphere to halve the charge yet again, then measure again.
If you do this successively, when you plot the results of distance vs ratio of charges (you cannot plot absolute charge because you don't have that reference), you will see the inverse square law.
i.e. ratio between the charges on the test spheres is: 1 (1/2+1/2); 3/4 (1/2 + 1/4); 5/8 (1/2 + 1/8); 9/16 (1/2 + 1/16) ........etc.