Unless I've missed something, they've used the O groundspeed in the initial formula by mistake. Unless they mean start at B and continue to B by turning round!?
The error would give 1240x360/680 = 656.5, leaving 583.5 to run outbound at 360kts, which is 1h37m.
By the way, 1.82 in your calcs is not 1h42, it's 1h49.