In this case, the continents are moving apart at a rate (velocity = 3 cm/y) and the distance for continent to move(distance= 500km). You are asked how long it will take(time). Then to answer this question you need to convert the 500km into the same unit as the velocity which was cm. The formula would be:
Distance = velocity x time
500km x 10^5 cm/km= 3cm/year x time
time= 5x 10^7 cm / (3cm/year)
time= 1.7 x 10^7 year or 17 million year