Accessing localhost of one qube from another

My goal is to be able to access frontends that are being hosted in one qube from a different qube. I thought that I could use the ip and port number, but that doesn’t seem to work because it would need to be the ip of sys-net which isn’t hosting the frontends and doesn’t have the port open. Is there any way to enable this inter-vm communication?

You can use this:

Or use socat with qrexec if you need UDP.

This is covered in thedocs

For other cases you could use a qrexec service to pass traffic between
qubes. This also is covered in the docs, and there are examples in the
Forum.

If you need help with either approach, ask with details of what you have
tried.

I never presume to speak for the Qubes team.
When I comment in the Forum I speak for myself.

The example in the docs that you linked to says that both qubes need to be connected to the same firewall. If I were to have whonix going from vpn > vpn firewall > sys-whonix > anon-whonix and the qube that I want to connect to the anon-whonix qube for networking going from vpn > vpn firewall > qube_to_localhost_from, would that count as both being connected to the same firewall?

No.
In this case you need to use qrexec to pass traffic between qubes. There
is qubes.ConnectTCP service for exactly this.

I never presume to speak for the Qubes team.
When I comment in the Forum I speak for myself.