I don't think your version (B), with *"after it being chased", is grammatical. (There are some prepositions that can take a "fused participle" like "it being chased", but after does not seem to be one of them.)
What's more, I don't think your version (A), with "after it had been chased", has quite the right meaning. The use of the pluperfect ("had been") makes it sound as if the being-chased-by-dogs part ended before the losing-its-way part; which is possible, of course, but doesn't seem very likely. It seems more likely that the cat lost its way while being chased by dogs.
English does have a "sequence of tenses" rule — that is, adverbial clauses (like your "after it had been […]") do inherit their tense from the matrix clause (your "the cat had lost its way after […]") — but this rule only extends to the present tense vs. the past tense. If the matrix clause is in the pluperfect, then the "sequence of tenses" rule requires only that the subordinate clause use a past tense (e.g. "after it was chased"). If you use the pluperfect in the subordinate clause, I think that implies that the subordinate clause is taking place before the rest of the matrix clause.
So, I would actually argue against both of your options, and instead recommend any of these:
- Neighbors said that the cat (had) lost its way after it was chased by a group of dogs.
- Neighbors said that the cat (had) lost its way when it was chased by a group of dogs.
- Neighbors said that the cat (had) lost its way after being chased by a group of dogs.
- Neighbors said that the cat (had) lost its way while being chased by a group of dogs.
Personally, I prefer #3, but that's just personal preference. All of these are perfectly correct, and have the same meaning (with some small nuances, perhaps).
I put the "(had)" in parentheses, by the way, because it's actually optional here. It's perfectly correct to use the pluperfect, since the neighbors were describing an event in their own past; but the "Neighbors said that […]" part is really just providing a source for the statement we really want to make, which is that the cat lost its way after being chased. In this sort of context, we can disregard the sequence of tenses rule and just put the primary statement into the ordinary tense that we would have used anyway. (This also applies in cases where the primary statement is in the present tense: "My English teacher told me that cat is a noun." Using the past tense, "that cat was a noun", would make it sound like this is merely a claim the English teacher made, and not necessarily a claim I'd support myself; whereas using the present tense, "that cat is a noun", makes clear that I myself am saying that cat is a noun, and am merely citing my teacher as a source.)