Let x = one way distance
Distance = (Rate)(Time), so Time = Distance/Rate
Speed upstream = 2 - 1 = 1
Speed downstream = 2 + 1 = 3
Time upstream + Time downstream = Total time
x/1 + x/3 = 1/2
Multiply by the LCD, 6: 6x + 2x = 3
8x = 3 x = 3/8 km
Michael swam 3/8 km each way for a total of 3/4 km.