To understand the solutions, it helps to visualize the data that's depicted. (Of course, you'll have the computer program do this entirely differently.) Based on the input, the roads basically look like this:
2 - 5 - 7
/ / \ \
1 - 3 - 6 - 8 - 10
\ / \ /
4 9
To cut off all paths from 1-10, just remove the choke points at 5 and 6.
However, to cut off from 5-10 (assuming all the roads are bidirectional), you can't just remove 7 and 8 - the robbers can backtrack from 5-3-6-9-10. So you have to cut off 7, 8 and 9.
Thus, for the first example, there are 2 places to cut off, but in the second, there are 3.