So I am doing an equation for straight line graphs and one of the expressions simplified out to:

5x/10.

It then said this could simply again to (5/10)x.

Why does this work?

I understand if I do it in my calculator (substituting x = 3)

5 * 3 = 15

15 / 10 = 1.5

and

5/10 = 0.5

0.5 * 3 = 1.5

They both give the same answer.

But I am trying to UNDERSTAND why this works as I am still confused.

I thought this only worked with terms that started with a + or - (where we could re-arrange them any way we wanted).

Why does it work here?