john and jacob set out together on bicycle traveling at 12 and 9 miles per hour , respectively . after 40 minutes , john stops to fix a flat tire . if it takes john one hour to fix the flat tire and jacob continues to ride during this time , how many hours will it take john to catch up to jacob assuming he resumes his ride at 12 miles per hour ? ( consider john ' s deceleration / acceleration before / after the flat to be negligible )
"john ' s speed - 12 miles / hr jacob ' s speed - 9 miles / hr after 40 min ( i . e 2 / 3 hr ) , distance covered by john = 12 x 2 / 3 = 8 miles . jacob continues to ride for a total of 1 hour and 40 min ( until john ' s bike is repaired ) . distance covered in 1 hour 40 min ( i . e 5 / 3 hr ) = 9 x 5 / 3 = 15 miles . now , when john starts riding back , the distance between them is 7 miles . jacob and john are moving in the same direction . for john to catch jacob , the effective relative speed will be 12 - 9 = 3 miles / hr . thus , to cover 7 miles at 3 miles / hr , john will take 7 / 3 = 2 1 / 3 hours answer b"
divide(add(subtract(12, 9), subtract(9, subtract(multiply(divide(40, const_60), 12), multiply(divide(40, const_60), 9)))), subtract(multiply(divide(40, const_60), 12), multiply(divide(40, const_60), 9)))