Let's solve Eqn. A first.
Eqn. A is:
5x = 3x
Divide each side by x:
5 = 3 (which, obviously, is a false statement)
So what did we do to get from Eqn. A to Eqn. B?
I divided each side by x.
So to get from Eqn. A to Eqn. B, I divided each side by the same variable.
Hence, D is correct.