Explanation:
1:10000
means we are using the same metric on the map and in reality.
just 1 unit in the map corresponds to 10000 units in reality.
so, e.g. 1 cm on the map = 10000 cm in reality.
1 m = 100 cm
so, 10000 cm = 100 m.
therefore, 1 cm on the map = 100 m in reality.
but we need 5 km = 5000 m.
that is 50 times 100 m in reality or 1 cm on the map.
so, the length on the map is 50 cm.