Average speed (12km/hr) = Total Distance / Total Time
D1 + D2 / T1 + T2
Total Time = 10 min + 20 min = 30 min = 1/2 Hour
D1 = Speed * Time = 9 * 1/6 (10 min = 1/6 hr)
= 3/2 km = 1.5 km
D2 = ?
12 = 1.5 + D2 / 1/2
12 * 1/2 = 1.5 + D2
6 = 1.5 + D2
6 - 1.5 = D2
4.5 km = D2
Speed = Distance / Time
= 4.5 / 1/3 (20 min = 1/3 hr)
= 4.5 * 3 (Reciprocal)
= 13.5 km/hr