I would use Wireshark on both PCs and watch Ethernet traffic to see broadcasted ARP/DHCP packets to observe IPs. This could help identify Modem B's WAN IP address as seen by Modem A.
You'll likely need to set up port forwarding on Modem B regardless to allow the SSH/SFTP connection through. Specifically, you'd forward TCP port 22 from Modem B's WAN interface to PC B's internal IP address.
However, the simplest modern solution would be to use Tailscale to connect the two networks and transfer the files. Tailscale uses WireGuard to create a secure mesh network that can traverse NAT boundaries without manual port forwarding.
Note that depending on the RF modem capabilities and Tailscale's NAT traversal success, connections might route through Tailscale's DERP relay servers (over the internet) rather than directly over your RF link. If keeping all traffic local is critical, you may need to verify this behavior.
You'll likely need to set up port forwarding on Modem B regardless to allow the SSH/SFTP connection through. Specifically, you'd forward TCP port 22 from Modem B's WAN interface to PC B's internal IP address.
However, the simplest modern solution would be to use Tailscale to connect the two networks and transfer the files. Tailscale uses WireGuard to create a secure mesh network that can traverse NAT boundaries without manual port forwarding.
Note that depending on the RF modem capabilities and Tailscale's NAT traversal success, connections might route through Tailscale's DERP relay servers (over the internet) rather than directly over your RF link. If keeping all traffic local is critical, you may need to verify this behavior.