The length of the shortest path from A to B that visits all vertices is the same as the shortest path from A to B that does not visit the clause vertices plus m because we have to pay one extra edge for each clause vertex that we visit here. 