b.yml should have context ./b/. Behavior is documented here:
When you use multiple configuration files, you must make sure all paths in the files are relative to the base Compose file (the first Compose file specified with
-f). This is required because override files need not be valid Compose files.