Explanation:
500 mg = 500 × 1 g / 1000 = 1/2 g = 0.5 g
so, the original target ratio is
0.5 g / 1 ml
the ratio has to be maintained when adding x ml of the sterile water to the 3 g.
3 g / x ml = 0.5 g / 1 ml
3 g / 0.5 g = x ml / 1 ml
3/0.5 = x
x = 6
only with x = 6 do we keep the target ratio.
so, we need to add 6 ml to the 3 g vial to make it a 500 mg/ml solution.