How did Kepler determine the orbital period of Mars?
He knew the orbital period of Earth. You can do this by observing the sun's motion in the sky over a year. (And then you know that the orbital period of the earth is a year.)

Now from earth, you can observe Mars from one Opposition (https://en.wikipedia.org/wiki/Opposition_(planets)) to another. You can find out the time ($T_\text{relative}$ it takes for Mars to do this, using which, you find the relative angular velocity between the orbital motions of earth and Mars ($\omega_\text{relative}=2\pi/T_\text{relative}$). This angular velocity is the difference between the angular velocities of earth and mars. Using this and knowing the orbital period of earth, you can find the orbital period of mars.

$2\pi/T_\text{relative}=2\pi/T_\text{earth}-2\pi/T_\text{Mars}$

Hope this is clear.