You can put this solution on YOUR website! Distance traveled = 40km/h * 30min + 60km/h * 15min
The first step is to convert the times to the same units.
I converted everything into hours.
1 hour = 60 min
So 30min* (1h/60min) = 0.5h
& 15min * (1h/60min) = 0.25h
Distance traveled = (40km/h * 0.5h) + (60km/h * .25h)
Distance traveled = 20km + 15km
Distance traveled = 35km