how to solve speed,distance and time in a short method