tom traveled the entire 80 miles trip . if he did the first 30 miles of at a constant rate 30 miles per hour and the remaining trip of at a constant rate 50 miles per hour , what is the his average speed , in miles per hour ?
"avg speed = total distance / total time = ( d 1 + d 2 ) / ( t 1 + t 2 ) = ( 30 + 50 ) / ( ( 30 / 30 ) + ( 50 / 50 ) ) = 80 / 2 = 40 mph c"
divide(80, add(divide(50, subtract(80, 30)), divide(30, 30)))