Let d stand for the distance we want to know. We can write an equation for the times of the two trips.
D/(96 km/hr) + (2 hr) = d/(64 km/hr)
2 km = d*(1/64 - 1/96) (multiply both sides by km/hr, subtract d/96)
2 km = d*(3/192 - 2/192) = d/192 (subtract the fractions)
(2*192) km = d = 384 km (multiply by 192)
D/(96 km/hr) + (2 hr) = d/(64 km/hr)
2 km = d*(1/64 - 1/96) (multiply both sides by km/hr, subtract d/96)
2 km = d*(3/192 - 2/192) = d/192 (subtract the fractions)
(2*192) km = d = 384 km (multiply by 192)