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.
https://www.cisco.com/assets/sol/sb/Switches_Emulators_v2_3_5_xx/help/250/index.html#page/tesla_250_olh/multi_forwarding.html https://serverfault.com/questions/121032/forward-mdns-from-one-subnet-to-another