Nesting your handler is perfectly acceptable, e.g. handler: B/handler_b.getAll should work just fine for routing your requests. I’m not sure I understand why you’d have a separate node_modules folder in a subdirectory of a project, but Node.js will typically look for a node_modules folder recursively from the directory of the file.
My suggestion would be to package your entire Serverless app as ONE single node module with a single package.json. If the two handlers are coupled anyway, I’m not sure what the benefit is of separating them within the same function.