The algorithm is correct, assuming we are looking for the shortest route from $s$ to $t$ that goes through $w$.
Any such route has two parts:
$s \rightarrow w$ and $w \rightarrow t$
So we need to find
$\text{dist}(s,w) + \text{dist}(w,t)$
First, run Dijkstra from $w$ in the original graph $G$.
This gives the shortest distance from $w$ to every vertex. Therefore,
$A[t] = \text{dist}(w,t)$
The problem is that we still need $\text{dist}(s,w)$, but Dijkstra starting at $w$ does not give distances to $w$.
So we reverse every edge of the graph.
In the reversed graph, a path $s \rightarrow w$ in $G$ becomes $w \rightarrow s$ in $G_r$ with the same total weight.
Therefore, running Dijkstra from $w$ in $G_r$ gives $B[s] = \text{dist}(s,w)$ in the original graph.
Hence,
$B[s] + A[t] = \text{dist}(s,w) + \text{dist}(w,t)$
which is the required shortest distance through $w$.
Since all edge weights are positive, Dijkstra's algorithm can be used in both runs.
Answer: Yes