In this question, sum of weights of mst for distinct values of n is following a pattern.
Ex. For n= 4, we have,
Sum of weight of mst = 3(v1->V2) + 4(v1->v3)+ 6 (v2->v4)
For n =5 , we have,
Sum of weights of mst = same as weight of mst for n=4 + 8(v3->v5)
We are observing two patterns here:
1) first is the weight of mst for n nodes is given by ----- weight of mst with n-1 nodes + (maximum weight of edge in mst having n-1 nodes + 2).
2) and the second pattern is in the edges we are taking. Like in n=4, the last edge we have taken is (v2->v4) , then in n=5, the last edge taken is from (v3->v5) and the rest edges are same as that of n=4, similarly for n=6, the edge taken would be from v4->V6, for n=7 , it would be from v5-> v7...and so on.
Now for n=10, we have to find weight of path form v5to V6.
The pattern for the mst would be :-
3(v1->V2) + 4(v1->v3) + 6(v2->v4) + 8(v3->v5) + 10(v4->V6) +12(v5->v7).......so on.
Sum of path from v5- to V6 in mst = 8(v5->v3) +4(v3->v1) + 3(v1->V2) + 6(v2->v4) + 10(v4->V6) = 31 .
so, 31 is the answer.