If I understand STP the way I think I do (and beleive me, I may not understand it), costs are cumulative back to the root of the bridge. So you have to add all of the costs to the "right" and then add all of the costs to the "left" of B13. The complete path back to core with the lowest cost should be the path that is taken.