Distance traveled equals the rate of travel times time or D=RT. The rate is meters per second.
D = (5 meters/2seconds) (t seconds) The "seconds" unit cancels out and you have "meters" as the unit.
If you did not know the equation, you could use the units to figure out the equation since you know that distance must have meters as a unit.