It's something plus m and we know that there is a path between A and B that visits each vertex exactly once, and so, the path length from A to B is almost the same as the number of vertices, it's just one less, so you can see this here in the example. 