how to do ratio in simplest from example 5km to 5m

First you need to express each term in the same units.

1km = 1000m

5000/5 = ?