In this specific example, the component you instantiate in "a" as "inst" is certain to be the component "b" declared in the architecture, because work.pak.b has a different port declaration.
If you instantiated a "b" with no ports in A, you should see work.pack.b.
Understand however that there is no inherent link between EITHER of these and "entity b". Only when the design is elaborated (e.g. at the start of simulation) will the tools look for a "b" that actually matches the component declarations. In this case it can find "b" declared in "a", but it won't find an entity matching "work.pak.b".
At this stage you can use configurations (either separate configurations, or configuration statements embedded in arch A) to bind a specific entity "work.b" to "b". This won't work with "work.pak.b" because of the mismatched port declarations.