Think about the two starting at 0,0 in the coordinate plane.
Then say they start travelling, one towards positive y and the other towards negative y.
They will end up at 7,0 and -7,0 after the first part.
They then turn right, so the one who was travelling towards positive y will now be travelling towards negative x, and the one travelling towards negative y will not be travelling towards positive x.
They will therefore finally end at 7,-9 and -7,9 after both parts.
Hence using pythagoras, the distance is:
sqrt((7 + 7)^2 + (9 + 9)^2) = sqrt(196 + 324) = sqrt(520)