Avahi uses mDNS which is a multicast protocol. Multicast is designed to be link-local only: it ends at the edge of a broadcast domain. Router A would also need to bridge in order for that to work (i.e. Device A and B would need to have the same broadcast ip).
On the other hand, there are ways of setting up Multicast Forwarding if the router supports it, or you could have a device in both networks that does Avahi/mDNS Reflection.