For the people who didn't understand the above explanations ( although going through them again will make it clear) I'm putting in simple words.
We're asked to find value 'x' so that shortest path between any two vertices contains the edge with cost 'x'.
Let us verify for the vertices 3 and 4.
To travel from vertex 3 to vertex 4: we have 3 possible paths.
1. Path 3-1-4 with cost=8+5=13
2. Path 3-2-4 with cost=5+8=13
3. Edge 3-4 with cost=x
So, for the edge 3-4 to be the shortest path between vertices 3 and 4, x should be less than 13.
Since we're asked to find the maximum value for x, the answer is 12.