what i think is O(v^4) may be the answer.
first of all the data is in adhency list like this
to compute inital distances time taken will be o(v3) as suppose i am calculating a then for the idstnce to b i have to seach all the adjency nodes of a . which may be v in worst case. and for c again and so v time i have to search v nodes which is v2 and i have to do so for v times . so v3. now when i have calculated the initial matrix distances. and such v matrix have to be calculated . else u may think this way .
now for distance of a to c through b we will hav to first find the distance from a to b which is v time and then from b to c which is also v time now . and then compare with the inital distances . so time complexity will be (v+V+1)=O(v) this is just one entry . such v^2 nodes have to calculated in worst case i.e. complete graph . and such v passes will be made so v*v^2*v=O(V^4).
answer may be wrong . what is the answer.