I need anyone to help me please#

Cecilia travelled a distance of 24 km at a speed of 18 km per hour. She rested for 30 minutes and then she complete the remaining 6 km at a speed of 20 km per hour. How much time did she use to cover this distance.

time for first leg = 24/18 hrs

resting = 1/2 hour
last leg = 6/20 hrs

add up the three times