Distance-vector routing starts with a small weighted neighbor graph.
A hears from a neighbor
Distance-vector routing lets a router improve its table by listening to a neighbor's advertised distances.
routers=4
The links are tiny and exact
This toy network has 4 routers and 5 undirected weighted links.
links=5
A can use B as a next hop
The A to B link cost is 1, so every route through B starts by paying that cost.
Summary
The update uses only the pinned topology and the neighbor vector; the lesson does not trust a hand-written route.
via B starts with 1