How do other planets than earth orbit in less time?

Planets that are closer to the Sun (Mercury and Venus) take less time to orbit the Sun.

Imagine it like a circular race track. If everyone started at the same spot the person closest to the inside of the circle would have a smaller distance to run than the person on the outside of the circle.

However there's another factor too. The closer a planet is to the Sun, the faster it moves in its orbit.